
The POST Repository API registers new content from a company account into the Repository.
On the Cloud, this API is available via SSL-secured HTTPS connection using the REST POST verb. The format query string parameter controls the desired response format. Specify either XML or JSON.
/api/v2/repository?format=xml/json
You may use either JSON or XML formats in your POST request.
You indicate this by setting the ContentType HTTP header as “application/json” or “application/xml”.
If no ContentType is specified, XML format is assumed.
All XML formatted requests must specify the following XML namespace in the data source root element: xmlns:i=”http://www.w3.org/2001/XMLSchema-instance”
Endpoints & API Explorer
| Node | API Endpoint | API Explorer |
|---|---|---|
| US | api/v2/repository | Model Description/Schema & Parameters |
Parameters
The POST verb for the Repository API allows you to register new content from a company account. The required and optional parameters for a POST call to the Repository API are outlined below.
| Name | Type | Description | Required |
|---|---|---|---|
| CompanyId | Integer | Your unique Company Id found on the Organisation Setup page of the secure website. | ✓ |
| ContentType | String | The type of content for this Repository item. | ✓ |
| ContentId | String | The unique identifier of the content for this Repository item. For Screen and Doc content, this identifier tracks the current Published version. | ✓ |
| Name | String | The Repository item’s name. | ✓ |
| Description | String | The Repository item’s description. | ✓ |
| Category | String | The Repository item’s category type. | ✓ |
| Keywords | String | The Repository item’s keywords. | |
| VendorId | Integer | Your unique Vendor account identifier. *Required if the account resides under a Master Vendor account. | ✓* |
| MasterId | Integer | Your unique Enterprise Toolkit account identifier. *Required if the account resides under a Master Enterprise account with EntToolKit enabled. | ✓* |
| IntegrationKey | String | Your unique Integration Key found on the Organisation Setup page of the secure website. | ✓ |
Example
Given that the API is REST-based, you can access the API directly via your web browser to test or by using Postman API Platform.
Below is an example of a typical POST submission to this API endpoint in JSON.
Request URL
https://eforms.mobileform.net:443/api/v2/repositoryRequest Body
{
"CompanyId": 6XXXX,
"ContentType": "Screen",
"ContentId": "36cXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"Name": "Job Order TEST",
"Description": "TEST Description text",
"Category": "General",
"Keywords": "",
"VendorId": 6XXXX,
"IntegrationKey": "995XXXXXXXXXXXXXXXXXXXXXXXXXXX"
}Response Body
{
"RepositoryItem": {
"Id": "f31XXXXXXXXXXXXXXXXXXXXXXXXX",
"CompanyId": 6XXXX,
"ContentType": "Screen",
"ContentId": "36cXXXXXXXXXXXXXXXXXXXXXXXXXX",
"Name": "Job Order TEST",
"Description": "TEST Description text",
"Category": "General",
"Keywords": ""
}
}