{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"b1ff9fe9-7533-4c74-85a9-eba1ad8aa179","name":"ACE API","description":"The ACE API is organized around [REST](https://en.wikipedia.org/wiki/Representational_state_transfer). Our API has predictable resource-oriented URLs, accepts [form-encoded](https://en.wikipedia.org/wiki/POST_(HTTP)#Use_for_submitting_web_forms) request bodies, returns [JSON-encoded](https://www.json.org/json-en.html) responses, and uses standard HTTP response codes, authentication, and verbs.\n\nThe ACE API differs for every instance as we release new versions and tailor functionality.\n\n---\n\n# Authentication\n\nThe ACE API uses API keys to authenticate requests. You can view and manage your API keys in your ACE user profile.\n\nYour API keys can have many user privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas.\n\nAll API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.\n\nAuthentication to the API can be performed is multiple ways. Authenticate to the API using one of the methods detailed below.\n\n### Basic Authentication\n\nAuthenticate your account using HTTP Basic Auth with your ACE username and password. The user must have access to the ACE API application.\n\n### Access Key Authentication\n\nAuthenticate your account using an ACE issued access key and secret access key. This authentication method is typically quicker than using username and password. The Access Key and Secret Access Key are generated within the ACE User Profile section.\n\nThe Access Key Authentication Token is comprised of The **Access Key ID** and **Secret Access Key** separated by two pipe characters.\n\n### Access Key Token Format ({{access_token}})\n\n``` php\nACCESS_KEY_ID||SECRET_ACCESS_KEY\n\n ```\n\nExample:\n\n``` curl\ncurl -H \"Authorization: Bearer {{access_token}}\" \n{{endpoint}}/service\n\n ```\n\n### OAuth Token Authentication\n\nAuthenticate your account using the OAuth authentication method. OAuth authentication access is configured within your ACE User Profile section.\n\nExample:\n\n``` curl\ncurl -H \"Authorization: Bearer {{access_token}}\" \n{{endpoint}}/service\n\n ```\n\n### Generating a new Access Token\n\n1. Go to the user profile in ACE and generate the Refresh Token if not generated. If the Refresh Token is already generated, copy the access code.\n    \n2. Go to your API application. Create a new POST request. ({{endpoint}}/service/access-token)\n    \n\n_Note: Using the refresh token will invalidate all previous access tokens._\n\n### Refreshing Authentication Token\n\n1. Go to your API application. Create a new POST request. ({{endpoint}}/authentication/refresh-token)\n    \n\n_Note: Using the refresh token will invalidate all previous access tokens._\n\n---\n\n# Responses\n\nThe structure of ACE API responses is as follows:\n\n``` json\n{\n    \"type\": String,\n    \"id\": String, // Optional\n    \"attributes\": {\n        \"attribute\": String || Array || Number,\n        ...\n    }\n}\n\n ```\n\n### Request (POST/PATCH/DELETE)\n\n``` json\n{\n    \"data\": {entity}\n}\n\n ```\n\n### Request with Multiple Entities (POST/PATCH/DELETE)\n\n``` json\n{\n    \"data\": [\n        {entity},\n        ...\n    ]\n}\n\n ```\n\n---\n\n# Errors\n\nACE uses conventional HTTP response codes to indicate the success or failure of an API request. In general:\n\n- Codes in the 2xx range indicate success.\n    \n- Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.).\n    \n- Codes in the 5xx range indicate an error with ACE's request or servers.\n    \n\nSome 4xx errors that could be handled programmatically (e.g., Forbidden access) include an error code that briefly explains the error reported.\n\n### Error response\n\n``` json\n{\n    \"errors\": {\n        \"status\": Number,\n        \"detail\": String\n    }\n}\n\n ```\n\nExample:\n\n``` json\n{\n    \"errors\": {\n        \"status\": 403,\n        \"detail\": \"Forbidden access\"\n    }\n}\n\n ```\n\n### Multiple errors response\n\n``` json\n{\n    \"errors\": [\n        {error},\n        ...\n    ]\n}\n\n ```\n\n### Error Handling\n\nOur API calls raise exceptions for many reasons, such as a failed change, invalid parameters, authentication errors, and network unavailability. We recommend writing code that gracefully handles all possible API exceptions.\n\n---\n\n# Pagination\n\nAll top-level API resources have support for bulk fetches via \"search\" API methods. For instance, you can search records, search projects, and search users. These search API methods share a common structure, taking at least these 2 parameters: limit & page\n\n| Parameters |\n| --- |\n| **limit** _optional, default is 10_  <br>A limit on the number of objects to be returned between 1 and 100 |\n\n---\n\n# Filtering\n\nFilters can be used in your search requests to narrow down your results to find what you want. Filters should be sent as raw JSON and will use syntax similar to SQL.\n\n### Filter Query\n\nTemplate\n\n``` json\n{\n   \"aql\": SELECT [COLUMNS] FROM [FROM] [WHERE]\n}\n\n ```\n\nExample\n\n``` json\n{\n   \"aql\": \"SELECT username from __main__ WHERE username co \\\"User\\\"\"\n}\n\n ```\n\n### \\[COLUMN\\]\n\n_\\*REQUIRED_  \nData that will be displayed after the search request is processed. The data will be based off of the column names for entity's table as well as joined tables. You can add multiple columns by separating each column by a comma.\n\nExample\n\n``` json\n{\n   \"aql\": \"SELECT id, username, status...\"\n}\n\n ```\n\nNOTE: Extra expressions include the following: \\[COUNT\\], \\[SUM\\], and \\[CONCAT\\]\n\n### \\[COUNT\\]\n\n_\\*OPTIONAL_  \nReturns the total number of items in the column based on the given conditions\n\nExample\n\n``` json\n{\n   \"aql\": \"SELECT COUNT(id) FROM __main__ WHERE status eq 1\"\n}\n\n ```\n\n### \\[SUM\\]\n\n_\\*OPTIONAL_  \nReturns the total sum of the values in a column based on the given conditions\n\n### \\[CONCAT\\]\n\n_\\*OPTIONAL_  \nReturns the concatenated result of two or more values in a column based on the given conditions\n\nExample\n\n``` php\n{\n   \"aql\": \"SELECT CONCAT(first_name, last_name) FROM __main__ WHERE id eq 1\"\n}\n\n ```\n\n### \\[FROM\\]\n\n_\\*REQUIRED_  \nThe table where you are querying data from. If you wish query from the current entity's table, use `__main__`. If you wish to join multiple tables, you can add them in the \\[JOIN\\] section as seen in the example below.\n\nExample\n\n``` json\n{\n   \"aql\": \"SELECT id, username, status FROM __main__ [JOIN]...\"\n}\n\n ```\n\n### \\[JOIN\\]\n\n_\\*OPTIONAL_  \nUsed to join tables that have a relationship with each other. You may find which tables your entity has a relationship with from the GET request.\n\nNOTE: When joining tables, be sure to add an alias to distinctly identify similar column names.\n\nExample\n\n``` json\n{\n   \"aql\": \"SELECT id, p.first_name, p.last_name FROM __main__ JOIN person as p...\"\"\n}\n\n ```\n\n### \\[WHERE\\]\n\n_\\*OPTIONAL_  \nThe defined attributes that filters your results. There are four kinds of attributes: \\[CONDITION\\], \\[META\\], \\[GROUP\\], and \\[ORDER\\]\n\nTemplate\n\n``` json\n{\n   \"... from __main__ [CONDITION]|[META] [GROUP] [ORDER]\"\n}\n\n ```\n\n### \\[CONDITION\\]\n\n_\\*OPTIONAL_  \nThis is where you compare column attributes for your entity to filter out your results. If you like to add multiple conditions, you may append additional conditions using AND or OR, as seen in the template below. There are 4 main types of conditions: \\[COMPARE\\], \\[IS\\], \\[IN\\], and \\[STRING\\].\n\nNOTE: When comparing dates, keep in mind that Date/Datetime must follow ISO_8601 format for combined date and time: YYYY-MM-DDTHH:mm:ssZ\n\nExample:\n\nUTC timezone: 1970-01-01T00:00:00Z.\n\nPST timezone: 1970-01-01T00:00:00-07:00\n\nTemplate\n\n``` php\n{\n   \"... from __main__ WHERE [CONDITION] AND|OR [CONDITION]...\"\n}\n\n ```\n\n### \\[COMPARE\\]\n\n_\\*OPTIONAL_  \nConditions that compare numerical values and dates to a given column. With this condition, you can only use the following operators in your comparison:\n\n``` json\n{\n    \"gte\": Greater than or equal to (>=),    // Finds all results that are greater than or equal to the given value\n    \"gt\": Greater than (>),                 // Finds all results that are greater than to the given value\n    \"lte\": Less than or equal to (<=),        // Finds all results that are less than or equal to the given value\n    \"lt\": Less than (<),                    // Finds all results that are less than the given value\n    \"eq\": Equals (=),                        // Finds all results that are equal to the given value\n    \"neq\": Not equals (<>),                 // Finds all results that are not equal to the given value\n    \"like\": Like (~),                        // Finds all results that are similar to the given value\n    \"not like\": Not like (!~),                // Finds all results that are not similar to the given value\n}\n\n ```\n\nExample\n\n``` php\n{\n   \"... WHERE status gte 1\"\n}\n\n ```\n\n### \\[IS\\]\n\n_\\*OPTIONAL_  \nConditions that check to see if there are any values set or not set for a given column. With this condition, you can only use the following operators:\n\n``` json\n{\n    \"is set\": Is set,            // Returns whether there are values set for the given column\n    \"is not set\": Is not set,     // Returns whether there are no values set for a given column\n    \"pr\": Is set                // This is the same as \"is set\"\n}\n\n ```\n\n### \\[IN\\]\n\n_\\*OPTIONAL_  \nConditions that check to see if any of the given set of values was set or not set for the given column. With this condition, you can only use the following operators:\n\n``` json\n{\n    \"in\": In,            // Returns whether one of the values in a given set was set for a given column\n    \"not in\": Not in,     // Returns whether one of the values in a given set was not set for a given column\n}\n\n ```\n\n### \\[STRING\\]\n\n_\\*OPTIONAL_  \nConditions that compare string values to a given column. With this condition, you can only use the following operators in your comparison:\n\n``` php\n{\n    \"sw\": Starts with, // Finds all results that starts with the given string\n    \"ew\": Ends with, // Finds all results that ends with the given string\n    \"co\": Contains, // Finds all results that contains the given string\n}\n\n ```\n\nExample\n\n``` json\n{\n   \"... WHERE name sw|ew|co \\\"test\\\"\"\n}\n\n ```\n\nNOTE: When dealing with strings, make sure to escape the quotations\n\n### \\[META\\]\n\n_\\*OPTIONAL_  \nThis is where you compare custom field attributes for your entity to filter out your results. If you like to add multiple conditions, you may append additional conditions using AND or OR, as seen in the template below. There are 3 main types of conditions: \\[COMPARE\\], \\[IS\\], and \\[IN\\].\n\nTemplate\n\n``` json\n{\n   \"... from __main__ WHERE [META] AND|OR [META]...\"\n}\n\n ```\n\nNOTE: When comparing dates, keep in mind that Date/Datetime must follow ISO_8601 format for combined date and time: YYYY-MM-DDTHH:mm:ssZ\n\nExample:\n\nUTC timezone: 1970-01-01T00:00:00Z.\n\nPST timezone: 1970-01-01T00:00:00-07:00\n\n### \\[COMPARE\\]\n\n_\\*OPTIONAL_  \nConditions that compare numerical values and dates to a custom field (meta). With this condition, the operators you can use are the same as the \\[COMPARE\\] condition for \\[CONDITION\\]\n\n### \\[IS\\]\n\n_\\*OPTIONAL_  \nConditions that check to see if there are any values to a custom field (meta). With this condition, the operators you can use are the same as the \\[COMPARE\\] condition for \\[CONDITION\\]\n\n### \\[IN\\]\n\n_\\*OPTIONAL_  \nConditions that check to see if any of the given set of values was set for a custom field (meta). With this condition, the operators you can use are the same as the \\[COMPARE\\] condition for \\[CONDITION\\]\n\n### \\[GROUP\\]\n\n_\\*OPTIONAL_  \nUsed to group the results by one or more columns. Usually used in conjunction with aggregate functions such as \\[COUNT\\] and \\[SUM\\].\n\nNOTE: This cannot be used with \\[META\\] conditions.\n\nTemplate\n\n``` json\n{\n   \"aql\": \"... [WHERE] GROUP BY [COLUMN]\"\n}\n\n ```\n\nExample\n\n``` json\n{\n   \"aql\": \"SELECT COUNT(id) FROM __main__ WHERE \\\"status\\\" eq 1 GROUP BY username\"\n}\n\n ```\n\n### \\[ORDER\\]\n\n_\\*OPTIONAL_  \nUsed to sort the results in ascending or descending order for one or more columns.\n\nNOTE: This cannot be used with \\[META\\] conditions.\n\nExample\n\n``` json\n{\n   \"aql\": \"SELECT id, username, status FROM __main__ WHERE \\\"status\\\" eq 1 ORDER BY id, username\"\n}\n\n ```\n\n---\n\n# Rate Limits\n\nAPI access rate limits are applied at a per-key basis in unit time. Every API response is accompanied by the following set of headers to identify the status of your consumption.\n\n| Header | Description |\n| --- | --- |\n| X-Rate-Limit-Limit | The maximum number of requests allowed with in a 24 hr period. |\n| X-Rate-Limit-Remaining | The number of requests remaining in the current time period. |\n| X-Rate-Limit-Reset | The number of seconds to wait in order to get the maximum number of allowed requests. Once you hit the rate limit, you will receive a response similar to the following JSON, with a status code of 429 Too Many Requests. |\n\n``` json\n{\n  \"error\": {\n    \"name\": \"rateLimitError\",\n    \"message\": \"Rate Limit exceeded. Please retry at 1465452702843\"\n  }\n}\n\n ```","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"4083921","team":142539,"collectionId":"b1ff9fe9-7533-4c74-85a9-eba1ad8aa179","publishedId":"TVRj6UP2","public":true,"publicUrl":"https://docs-api.pscace.com","privateUrl":"https://go.postman.co/documentation/4083921-b1ff9fe9-7533-4c74-85a9-eba1ad8aa179","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"1970B9"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.11.4","publishDate":"2020-10-09T18:06:04.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"ACE Cloud","id":"a2979692-a8e8-48af-9238-afbdb91b9ada","owner":"4083921","values":[{"key":"endpoint","value":"https://YOUR-SUBDOMAIN.pscace.com/gateway/v3","enabled":true},{"key":"access-token","value":"","enabled":false}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/e42022e1722c499b7e14e114a9377fa3126148af27652686aee20661d8e1a793","favicon":"https://res.cloudinary.com/postman/image/upload/v1602131973/team/nhbvbcruecoy03lxt85w.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"ACE Cloud","value":"4083921-a2979692-a8e8-48af-9238-afbdb91b9ada"}],"canonicalUrl":"https://docs-api.pscace.com/view/metadata/TVRj6UP2"}