リソース
Version 24.2.9039
Version 24.2.9039
リソース
概要
Resources are objects exposed in the Admin API that can be queried, created, updated, and deleted. These Resources include:
- Files Retrieve files in the application workflow, or push files into the application workflow by adding them to a connector’s input folder.
- Certificates Retrieve or update the digital certificates used for encryption, signing, decryption, verification, SSL/TLS, etc.
- Connectors Retrieve or update the configuration for existing connectors, or add a new connector to the application workflow.
- Transactions Retrieve metadata from the Transaction Log, where successful and failed file transmissions (send and receive) are recorded.
- Logs Retrieve log data from the Application Log, where application-level errors are recorded.
- Profile Retrieve or update the configuration for the application’s local profile.
- Requests Retrieve log data from the Access Log, where HTTP requests are recorded.
- Workspaces Retrieve or create Workspaces for grouping together connectors.
Each Resource is exposed at a dedicated application endpoint using the following convention: /api.rsc/resourceName
. For example, if CData Arc is hosted on mydomain.com and listening on port 8001, the following endpoint would be used to access the Files Resource:
http://mydomain.com:8001/api.rsc/files
Resource Methods
This section describes the HTTP methods used to perform operations on the Resources exposed by the Admin API.
GET
An HTTP GET request can be used to retrieve a Resource or set of Resources from Arc. GET requests may return multiple items or only a single item, depending on whether query parameters are specified in the request.
GET Requests Without Parameters
GET requests that do not include query parameters will return all instances of that Resource type. For example, if a GET request without query parameters is made to the Certificates Resource, the response will include every certificate saved in the application. A similar request to the Connectors Resource will return configuration data for every configured connector instance in the Arc Flow.
The target URL for GET requests without parameters should be the same as the Resource endpoint. For example:
GET http://mydomain.com:8001/api.rsc/certificates
GET Requests With Parameters
GET requests can include query parameters in the target URL to limit the result set to a single instance of the target Resource. For example, a GET request to the Files Resource could include the specific connector, Folder, and Filename parameters to retrieve a single file processed by that connector. Query parameters are specified in parentheses at the end of the target URL. For example:
GET http://mydomain.com:8001/api.rsc/files(connectorId='myConnector',Folder='Receive',Filename='myFile.txt')?@authtoken=myAuthTokenValue
The available parameters for each Resource are detailed in the API Browser in the application UI.
POST
An HTTP POST request can be used to create a new instance of the specified Resource in Arc. For example, making a POST request to the Files Resource would insert a file into to the Arc Flow, and making a POST request to the Connectors Resource would create a new configured connector in the flow.
The parameters for the new resource are provided as the body of the POST in JSON format. The request must include the appropriate content-type header (for example, application/json) for the POST body to be interpreted correctly. The available properties for each Resource are detailed in the API Browser in the application UI. The following is an example POST body for the Connectors Resource:
{
"ConnectorId":"myNewConnector",
"ConnectorType":"Zip",
"Workspace":"Default",
}
The Connectors Resource also supports additional properties according to the specified ConnectorType. Any configurable connector field can be set during the POST call by including the field name and value in the JSON body. For example, when creating a new Zip connector, the Operation field of the connector could be set to Decompress:
{
"ConnectorId":"myNewConnector",
"ConnectorType":"Zip",
"Workspace":"Default",
"Operation":"Decompress"
}
The target URL for POST requests should be the same as the resource endpoint:
POST http://mydomain.com:8001/api.rsc/connectors
PUT
An HTTP PUT request can be used to update an instance of the specified Resource in Arc. For example, making a PUT request to the Connectors Resource would update the settings for a single configured connector in the Arc flow.
PUT requests require a combination of the following items:
- Query parameters in the target URL. These parameters specify which instance of the Resource to update—for example, which connector to update.
- Properties in the JSON body of the PUT request. These properties determine which fields are updated in that Resource—for example, what connector configuration fields should be set to new values.
Query parameters are specified in parentheses at the end of the target URL, for example:
PUT http://mydomain.com:8001/api.rsc/connectors(ConnectorId='myZipConnector')
The JSON body of the request includes resource-specific fields to update for the target resource instance. The request must include the appropriate content-type header (e.g. application/json) for the PUT body to be interpreted correctly.
Below is an example JSON body for a PUT request to update the Operation field of a Zip connector instance:
{
"Operation":"Compress"
}
DELETE
An HTTP DELETE request can be used to remove an instance of the specified Resource from Arc. For example, making a DELETE request to the Files resource would delete a file from the Arc workflow.
DELETE requests include query parameters in the target URL to identify the instance of the Resource to delete. Query parameters are specified in parentheses at the end of the target URL. For example:
DELETE http://mydomain.com:8001/api.rsc/files(connectorId='myConnector',Folder='Send',Filename='myfile.txt')
The available parameters for each Resource are detailed in the API Browser in the application UI.