Curlie (DMOZ 2.0) API Constants and Error Codes
This document provides details about various constants, info messages, and error codes returned by the Curlie API.
Contents
- 1 Constants
- 1.1 Feature
- 1.2 RelationType
- 1.3 PermissionType
- 1.4 EditorStatus
- 1.5 SubmissionStatus
- 1.6 UserNoteType
- 1.7 PreferenceBit
- 1.8 CommentType
- 1.9 DevidType
- 1.10 DevidStatus
- 1.11 NodeGetMode
- 1.12 UserWarnStatus
- 1.13 AbuseStatus
- 1.14 Subject
- 1.15 Ban
- 1.16 Tool
- 1.17 ToolStatus
- 1.18 PublicAbuse
- 1.19 URLSubmission
- 1.20 Misc
- 1.21 FlagType
1. Constants
There are different values used in API calls for certain parameters. These values are integer numbers. Here is the detail what they means/represent in Curlie API:
1.1 Feature
Following can be valid features for a node:
- no_add_url, no_become_editor, no_cooling, no_futuredate, no_nofullalpha
- FEATURE_VALUES = {"on", "off for cat", "off for tree"}
- FEATURE_VALUE_KEYS = {"catconf_on", "catconf_off_for_cat", "catconf_off_for_tree"}
- FEATURE_ON = 0;
- FEATURE_OFF_FOR_CAT = 1;
- FEATURE_OFF_FOR_BRANCH = 2;
1.2 RelationType
- SYMBOLIC = 1
- ALTLANG = 2
- RELATED = 3
- NARROW = 4
- ALPHA = 5
1.3 PermissionType
- NODE_RELATED = 1
- GLOBAL = 2
1.4 EditorStatus
- INACTIVE = 0
- ACTIVE = 1
- JOINED = 2
- REINSTATED = 3
- RESIGNED = 4
- DEACTIVATED = 5
- UNVERIFIED = 6
1.5 SubmissionStatus
- USER_NOT_EXISTING = -3
- USER_INACTIVE = -2
- USER_EXISTING = -1
- SUBMITTED = 0
- PROCESSING = 1
- APPROVED = 2
- DENIED = 3
- UPDATED = 4
- PENDING = 5
- GREENBUSTED = 6
- HTTP_OK = 200
- HTTP_UNKNOWN_ERROR = 0
- HTTP_404_ERROR = 404
- HTTP_500_ERROR = 500
1.6 UserNoteType
- PRO_NOTE_TYPE = 1
- APP_NOTE_TYPE = 2
- REQ_NOTE_TYPE = 3
1.7 PreferenceBit
- SHOWIM = 0x01;
- SHOWICQ = 0x02;
- SHOWLASTEDIT = 0x04;
- SHOWDUPURL = 0x08;
- DISABLETD = 0x10;
- DISABLECOLOREDIT = 0x20;
- DISABLECATINUNREV = 0x40;
- DISABLENEWS = 0x80;
- SHOWPAGEREG = 0x100;
- SHORTSITECOUNT = 0x200;
1.8 CommentType
- REGULAR = "regular"
- PURPLE = "purple"
- RED = "red"
- YELLOW = "yellow"
- GREEN = "green"
1.9 DevidType
- DEVELOPMENT_KEY = 1
- PRODUCTION_KEY = 2
- PRODUCTION_KEY_TOOL = 3
1.10 DevidStatus
- PENDING = 0
- SUBMITTED = 1
- APPROVED = 2
- DENIED = 3
- PENDING_EMAIL_VERIFICATION = 4
- REACTIVATED = 5
- DEACTIVATED = 6
- REQUEST_REACTIVATE = 7
- PENDING_ADMIN_APPROVAL = 8
1.11 NodeGetMode
- NORMAL = "normal"
- EDITING_INDEX = "editing_index"
- EDITING_DETAIL = "editing_detail"
1.12 UserWarnStatus
- CREATED = 0
- ACKNOWLEDGED = 1
1.13 AbuseStatus
- SUBMITTED = 0
- INVESTIGATING = 1
- RESOLVED = 2
1.14 Subject
Subject in DenyEditor API call can be:
- narrow - will send an email "Narrow your category "
- youcando - will send an email "Already an editor"
- reject - Will send an email "Rejected"
- later - Will send an email "Apply again later "
1.15 Ban
- BANNED = 1
- NOT_BANNED = 0
- BAN_EMAIL = 1
- BAN_APPLICATION = 2
- BAN_SUBMISSION = 3
1.16 Tool
- VISIBLE = 1
- INVISIBLE = 0
- OFFICIAL = 1
- UNOFFICIAL = 0
1.17 ToolStatus
- PENDING = 1
- SUBMITTED = 2
- APPROVED = 3
- DENIED = 4
- UNDER_REVIEW = 5
- IN_DEVELOPMENT = 6
1.18 PublicAbuse
Status can have following values:
- new
- investigate
- newvigate
- resolved
Action can have following values:
- new
- investigate
- addnote
- resolved
- giveback
Type can have following values:
- duplicate
- not ODP related
- no fault
- not abuse
- no evidence
- malicious
- abuse found
Message can have following values:
- For NEW = "Its current status is new - This report has not yet been investigated. We aim to do so at the earliest possible opportunity. :)"
- For RESOLVED = "Its current status is resolved - This report has been resolved. We do not disclose the details of our findings, but if abusive editing was found it will be rectified. Thank you for your report. :)"
- For INVESTIGATE = "Its current status is investigate - A meta is currently investigating this report.";
1.19 URLSubmission
Status can have following values, it corresponds to urlStatus field:
- Approved = 0
- Rejected = 1
- FYI = 2
- ALL = 3 - This is used for searching purpose only.
URLStatusReason can have following values, it corresponds to urlStatusReason field:
- SUBMITTER_EMAIL_BLOCKED = 1
- URL_BLOCKED = 2
- IP_BLOCKED = 3
- EMPTY_DESCRIPTION = 4
- INVALID_NODE = 5
- EMPTY_TITLE = 6
- INVALID_URL_CONTENT_TYPE = 7
- INVALID_EMAIL = 8
- EMPTY_EMAIL = 9
- INVALID_URL = 10
- EMPTY_URL = 11
- DOMAIN_BLOCKED = 12
- EMAIL_BLOCKED = 13
- ROBOZUKI_URL_STATUS_ERROR = 14
- ROBOZUKI_URL_REDIRECT = 15
- ROBOZUKI_URL_500_INTERNAL_SERVER_ERROR = 16
Batch can have following values:
- LAST_30_DAYS = -30
- ALL = 0
ProcessStatus can have following values:
- PROCESSED = 1
- UNPROCESSED = 0
- MOVED = 2
1.20 Misc
- DMOZ_ROOT = "" - BLANK
- DMOZ_TOP = /Top
- DMOZ_ADULT_TOP = /Adult
- DMOZ_TEST_TOP = /Test
- DMOZ_BOOKMARKS_TOP = /Bookmarks
- DMOZ_KTOP = /Kids_and_Teens
- DMOZ_DEFAULT_LANGUAGE_ID = 1 - by default language is English. 1 is language Id for English.
- RESPONSE_FORMAT_XML = text/xml;charset=utf-8
- RESPONSE_FORMAT_JSON = text/json;charset=utf-8
- STAFF_EMAIL = ConfigManager.getProperty("dmoz.staff.email","staff@dmoz.org"); //Will read from properties file if not present will give default as staff@dmoz.org
- URL_TAG_SEPARATOR = " " - Single Space;
- GROUPPERM_SEPARATOR = |
- URLS_SEPARATOR = |
1.21 FlagType
- UPDATE_REQUEST = 1
- URL_ERROR = 2
- PARKED_HIJACKED = 3
- MISPLACED = 4
- INAPPROPRIATE = 5
- QC_NOTE = 16 (autoflag)
- EDITOR_NOTE = 17 (editor guidance flag)
2. Status Codes and Status Messages
Status codes appear in response header tag in the API. The code tag represents the status_code and description represents the detailed message related to that. Sometimes codes are sufficient so description might be empty in those cases.
2.1 Success
- STATUS_OK = "OK" - In case of success
2.2 Error Codes and Status Messages
<Numbering> <Status_Code> - <Description_of_Error_code>
- ERROR - In case of generic failure.
- ERROR_INVALID_DEVID - If devid supplied is not a valid devid.
- ERROR_NOT_ALLOWED_IP - If user tries to access from an IP which is banned in Curlie, then this error will come.
- ERROR_ATOMICS - In case any issues with Atomics server, like its down, etc.
- ERROR_SOLR - In case any issues with Solr server, like its down, etc.
- ERROR_INVALID_PARAMETER - If a parameter is required, either the parameter is missing from the call or an invalid value is provided.
- ERROR_INVALID_ACTION - The API action does not exist. e.g. While adding a node ont/add is a valid action.
- ERROR_NODE_NOT_FOUND - The node referred in the API call as parameter is not found in DB.
- ERROR_FEATURE_DISABLED - As mentioned in constants, the particular feature is disabled for that node.
- ERROR_URL_ALREADY_EXISTS_IN_NODE - URL which you are trying to add to this node is already present.
- ERROR_URL_NOT_FOUND - URL referred in the call does not exist.
- ERROR_INVALID_MEDIADATE_FORMAT - MediaDate parameter format is incorrect.
- ERROR_PARENT_NOT_EXIST - Parent node referred in Call does not exist.
- ERROR_NODE_EXISTS - The node which is being created/renamed/moved etc already exists.
- ERROR_NODE_IS_NOT_LEAF - Node is not a leaf node.
- ERROR_LANGUAGE_NODE_NOT_FOUND - The language node given in API call is invalid and not present in System.
- ERROR_ILLEGAL_NEW_NODE_NAME - Invalid node name provided.
- ERROR_SOLR_NOT_READY - Issue with Solr server.
- ERROR_NO_AUTHORITY - User does not have permission to perform this operation.
- ERROR_INVALID_COMMENT_ID - The commentId given in API call is invalid.
- ERROR_INVALID_USER - Invalid User.
- ERROR_INCONSISTENT_DEVID - Devid used in login call is different from the devid used in this API call.
- ERROR_INVALID_TOKEN - Token is invalid.
- ERROR_TOKEN_EXPIRED - Token is expired.
- ERROR_PERMISSION_EXISTS - Permission referred already exists in System.
- ERROR_PERMISSION_NOT_FOUND - Permission referred does not exist.
- ERROR_RELATIONSHIP_NOT_FOUND - Node relationship referred does not exist.
- ERROR_GROUP_NOT_EXISTS - Group referred does not exist.
- ERROR_GROUP_PERMISSION_NOT_EXISTS - permission referred does not exist for this group
- ERROR_GROUP_PERMISSION_EXISTS - permission referred already exists for this group
- ERROR_INACTIVE_USER - User is inactive.
- ERROR_LOW_ACCESS_LEVEL - Operation not allowed.
- ERROR_USER_HAS_THE_PERMISSION - User already has the permission.
- ERROR_USER_HAS_THE_GROUP - User already associated with the group
- ERROR_GROUP_EXISTS - Group already exists.
- ERROR_USER_EXISTS - User already exists.
- ERROR_RELATION_DETAIL - Relation detailis invalid.
- ERROR_DOMAIN_NOT_EXISTS - Domain referred does not exist.
- ERROR_AFFILIATION_NOT_EXISTS - Affiliation referred does not exist.
- ERROR_ILLEGAL_PERMISSION_TYPE - Permission type is illegal.
- ERROR_USER_PERMISSION_NOT_EXISTS - User does not have permission.
- ERROR_INVALID_TIMEZONE - Invalid Timezone provided.
- ERROR_INVALID_FORMAT - Invalid format given.
- ERROR_INVALID_IP_RANGE - IP Range is invalid
- ERROR_HOOK_NOT_FOUND - Hook does not exist
- ERROR_EVENT_TYPE_NOT_FOUND- Event type referred does not exist.
- ERROR_SUBMISSION_NOT_FOUND - Submission referred does not exist.
- ERROR_SUBMISSION_UNDER_PROCESSING - Submission under processing.
- ERROR_INVALID_DOMAIN - Invalid domain.
- ERROR_BANNED_EMAIL - Email id is blocked.
- ERROR_BANNED_IP - IP is blocked.
- ERROR_BANNED_DOMAIN - Domain is blocked.
- ERROR_HOOK_RETURN - Error in Hook return.
- ERROR_TEMPLATE_NOT_FOUND - Template referred does not exist.
- ERROR_EMAIL_NOT_MATCH - Email does not match.
- ERROR_MULTIPLE_SUBMISSION_FROM_ONE_EMAIL - Multiple submissions present for one email.
- ERROR_USER_ALREADY_IN_QUEUE - User already in queue.
- ERROR_USER_STILL_ACTIVE- User is still active.
- ERROR_INCORRECT_PASSWORD - Incorrect password.
- ERROR_INVALID_KEY - Key is invalid.
- ERROR_LINK_NOT_FOUND- Link referred does not exist.
- ERROR_NOTE_NOT_FOUND - Note referred does not exist.
- ERROR_AFFILIATION_ALREADY_EXIST - Affiliation referred already exists.
- ERROR_INVALID_CATEGORY_NAME - Category name is invalid.
- ERROR_UNKNOWN_TEMPLATE - Template is unknown.
- ERROR_WARN_NOT_FOUND - Warning not found.
- ERROR_INVALID_ACKNOWLEDGEMENT - Invalid acknowledgement.
- ERROR_INVALID_ABUSE_STATUS - Invalid abuse status
- ERROR_INVALID_ABUSE_MD5 - Invalid abuse MD5 string.
- ERROR_INVALID_GROUPNAME - Invalid group name.
- ERROR_INVALID_AUTH_REQUEST; - Invalid login/logout/validatetoken request.
- ERROR_SOLR_EXCEPTION - Error in Solr.
- ERROR_DUPLICATE_DATA_EXISTS - Data already exists.
- ERROR_URL_ALREADY_UNREVIEWED - Url already unreviewed.
- ERROR_EMAIL_NOT_VERIFIED - Email is not verified yet.
- ERROR_REQUEST_ALREADY_PROCESSED - Request has already been processed.
- ERROR_BANNED_EMAIL_ALREADY_EXISTS - Email is already Banned.
- ERROR_BANNED_IP_ALREADY_EXISTS - IP is already Banned.
- ERROR_BANNED_DOMAIN_ALREADY_EXISTS - Domain is already Banned.
- ERROR_EMAIL_NOT_FOUND - Email does not exist.
- ERROR_USER_NOT_FOUND - User does not exist.
- ERROR_BANNED_EDITOR_ALREADY_EXISTS - Editor is already banned.
- ERROR_TOOL_NOT_FOUND - Tool not found.
- ERROR_TOOL_ALREADY_EXISTS - Tool already exists.
- ERROR_TOOL_ALREADY_DENIED - Tool is denied.
- ERROR_ABUSE_NOT_FOUND - The abuse does not exist.
- ERROR_ABUSE_ALREADY_RESOLVED - Abuse is already resolved.
- ERROR_ABUSE_UNDER_INVESTIGATION - Abuse is currently under investigation.
2.3 Information Status Codes and Messages
- INFO_NODE_RENAMED - Node is renamed.
- INFO_NODE_NOT_RENAMED - Node is never renamed.
- INFO_USER_WARNED - User has got warning.
- INFO_NO_RATING_FOR_URL - No Rating present for this url