{ "$id": "common-api", "description": "Type definitions used in multiple api-related definitions.", "definitions": { "pagination-metadata": { "description": "Properties describing search result pagination", "type": "object", "properties": { "skip": { "type": "integer" }, "limit": { "type": "integer" }, "total": { "type": "integer" }, "nextPageSkip": { "oneOf": [ { "type": "null" }, { "type": "integer" } ] }, "previousPageSkip": { "oneOf": [ { "type": "null" }, { "type": "integer" } ] }, "currentPageSize": { "type": "integer" } } }, "success-response": { "description": "A success response from an API method", "type": "object", "additionalProperties": false, "required": [ "message", "data", "metadata" ], "properties": { "message": { "description": "A human-readable message summarizing the result of the operation", "type": "string", "examples": [ "Successfully created the requested item", "Successfully imported 3 of 4 documents", "Successfully retrieved search results" ] }, "data": { "description": "Any successfully retrieved information related to the request." }, "metadata": { "description": "Any structured, wordy or machine-readable information related to the result of the operation. For success responses, this may contain information like pagination values from a search operation.", "type": "object", "additionalProperties": true } } }, "failure-response": { "description": "A failure response from an API method", "type": "object", "additionalProperties": false, "required": [ "message", "data", "metadata" ], "properties": { "message": { "description": "A human-readable message summarizing the result of the operation", "type": "string", "examples": [ "A server error occurred while processing this request" ] }, "data": { "const": "null", "description": "Any successfully retrieved information related to the request. For error responses, this is always 'null'." }, "metadata": { "description": "Any structured, wordy or machine-readable information related to the result of the operation. For error responses, this will always at least contain an 'errors' array, even if it is empty.", "type": "object", "properties": { "errors": { "type": "array" } }, "additionalProperties": true } } }, "pluralSearchQueryParameters": { "title": "pluralSearchQueryParameters", "type": "object", "properties": { "limit": { "type": "integer", "description": "Number of results to return. Used for pagination.", "default": 25, "minimum": 0, "examples": [ 1, 10, 50 ] }, "skip": { "type": "integer", "description": "Number of results to skip. Used for pagination.", "default": 0, "minimum": 0, "examples": [ 1, 10, 50 ] }, "order": { "type": "integer", "description": "Sort direction, 1 for ascending and -1 for descending.", "default": 1, "enum": [ -1, 1 ] }, "sort": { "type": "string", "description": "Field to sort by", "default": "name", "enum": [ "name" ] }, "include": { "type": "string", "description": "Inclusive projection operator formatted as a comma-delineated list. '_id' will be included implicitly unless excluded with 'exclude=_id'. May only be used in conjunction with 'exclude' when 'exclude=_id'.", "examples": [ "name", "description", "name,description" ] }, "exclude": { "type": "string", "description": "Exclusive projection operator formatted as a comma-delineated list. May only be used in conjunction with 'include' when 'exclude=_id'.", "examples": [ "_id", "description", "_id,description" ] }, "in": { "description": "Search for fields exactly matching one of the given list options", "type": "string" }, "not-in": { "description": "Search for fields not exactly matching one of the given list options", "type": "string" }, "equals": { "description": "Returns results where the specified fields exactly match the given match string(s).", "type": "string" }, "contains": { "description": "Returns results where the specified fields contain the given match string(s).", "type": "string" }, "starts-with": { "description": "Returns results where the specified fields start with the given match string(s).", "type": "string" }, "ends-with": { "description": "Returns results where the specified fields end in the given match string(s).", "type": "string" }, "dereference": { "description": "Designates foreign key fields to dereference in the API output.", "type": "string" }, "gt": { "description": "Returns results where the specified fields have values greater than the specified values.", "type": "string" }, "gte": { "description": "Returns results where the specified fields have values greater than or equal to the specified values.", "type": "string" }, "lt": { "description": "Returns results where the specified fields have values less than the specified values.", "type": "string" }, "lte": { "description": "Returns results where the specified fields have values less than or equal to the specified values.", "type": "string" }, "q": { "description": "Accepts a full query expression as a URL-encoded JSON object. Supports all other query operators, in addition to logical conjunction with 'and', disjunction with 'or', and negation with 'not'. May be combined with other top-level operators.", "type": "string" } } }, "getJobsQueryParameters": { "title": "getJobsQueryParameters", "type": "object", "properties": { "limit": { "type": "integer", "description": "Number of results to return. Used for pagination.", "default": 25, "minimum": 0, "examples": [ 1, 10, 50 ] }, "skip": { "type": "integer", "description": "Number of results to skip. Used for pagination.", "default": 0, "minimum": 0, "examples": [ 1, 10, 50 ] }, "order": { "type": "integer", "description": "Sort direction, 1 for ascending and -1 for descending.", "default": 1, "enum": [ -1, 1 ] }, "sort": { "type": "string", "description": "Field to sort by", "default": "name", "enum": [ "name" ] }, "include": { "type": "string", "description": "Inclusive projection operator formatted as a comma-delineated list. '_id' will be included implicitly unless excluded with 'exclude=_id'. May only be used in conjunction with 'exclude' when 'exclude=_id'.", "examples": [ "name", "description", "name,description" ] }, "exclude": { "type": "string", "description": "Exclusive projection operator formatted as a comma-delineated list. May only be used in conjunction with 'include' when 'exclude=_id'.", "examples": [ "_id", "description", "_id,description" ] }, "in": { "description": "Search for fields exactly matching one of the given list options", "type": "string" }, "not-in": { "description": "Search for fields not exactly matching one of the given list options", "type": "string" }, "equals": { "description": "Returns results where the specified fields exactly match the given match string(s).", "type": "string" }, "contains": { "description": "Returns results where the specified fields contain the given match string(s). When used on the 'description' field, returns results containing any matching whole word, delimited by most punctuation. Double-quotes may be used to match phrases rather than individual words.", "type": "string" }, "starts-with": { "description": "Returns results where the specified fields start with the given match string(s).", "type": "string" }, "ends-with": { "description": "Returns results where the specified fields end in the given match string(s).", "type": "string" }, "dereference": { "description": "Designates foreign key fields to dereference in the API output.", "type": "string" }, "gt": { "description": "Returns results where the specified fields have values greater than the specified values.", "type": "string" }, "gte": { "description": "Returns results where the specified fields have values greater than or equal to the specified values.", "type": "string" }, "lt": { "description": "Returns results where the specified fields have values less than the specified values.", "type": "string" }, "lte": { "description": "Returns results where the specified fields have values less than or equal to the specified values.", "type": "string" }, "q": { "description": "Accepts a full query expression as a URL-encoded JSON object. Supports all other query operators, in addition to logical conjunction with 'and', disjunction with 'or', and negation with 'not'. May be combined with other top-level operators.", "type": "string" }, "exists": { "description": "Returns results where the specified fields exist according to the specified value.", "type": "string" } } }, "simplePluralSearchQueryParameters": { "type": "object", "properties": { "contains": { "type": "string", "examples": [ "event" ], "description": "The value for a contains query. if the property with the key of containsField does not have a value that contains this string, then filter out the document" }, "containsField": { "type": "string", "examples": [ "name" ], "description": "The field to run a contains query on" }, "equals": { "type": "string", "examples": [ "my event trigger" ], "description": "The value for an equals query. if the property with the key of equalsField does not have a value that equals this string, then filter out the document" }, "equalsField": { "type": "string", "examples": [ "name" ], "description": "The field to run an equals query on" }, "startsWith": { "type": "string", "examples": [ "my" ], "description": "The value for a startsWith query. if the property with the key of startsWithField does not have a value that starts with this string, then filter out the document" }, "startsWithField": { "type": "string", "examples": [ "name" ], "description": "The field to run a startsWith query on" }, "limit": { "type": "integer", "description": "Number of results to return. Used for pagination.", "default": 25, "minimum": 0, "examples": [ 1, 10, 50 ] }, "skip": { "type": "integer", "description": "Number of results to skip. Used for pagination.", "default": 0, "minimum": 0, "examples": [ 1, 10, 50 ] }, "order": { "type": "integer", "description": "The sort direction: 1 for ascending or -1 for descending.", "default": 1, "enum": [ -1, 1 ] }, "sort": { "type": "string", "description": "Field to sort by. Default is name.", "default": "name", "enum": [ "name" ] } } } } }