The JSON object that is sent to the API is comprised of three components:
objectused to identify the user.
objectused to set certain behaviours of the request.
arrayof objects defining a sequence of functions you would like to run.
The JSON object that is sent to the API must contain the
auth key at the top level of the object. The
auth object takes the following properties:
|Your SkyCiv username used to sign into the platform.|
|Your SkyCiv API key from the account settings page.|
The initial call object:
Subsequent calls object (within 30 mins of making the initial call):
If you provide
session_id, the session ID will be used to authenticate. If the session ID has expired, the
key will be used to start a new session. If
key is not provided and the provided session ID has expired, the request will fail.
username property should have a string value of your SkyCiv username.
session_id property in lieu of
key will allow you to skip the verification process for subsequent calls within 30 minutes of the first call. If the
session_id property is not provided, you must provide
When using the
S3D.session.start function, you can opt to keep your session open by setting the
keep_open property to
true. This means that after you run a batch of functions, you can keep the session open for 30 minutes. This allows you to re-visit the session without having to re-authenticate therefore increasing the speed of subsequent calls.
If you set the
keep_open property to
true, the API will return a
last_session_id that you can use for the next authentication. The code block below shows the response from the initial call containing the
The options property allows you to provide an object which specifies certain behaviours of the request. The options object accepts the following values:
|Verify the model input with SkyCiv's built in model validator.|
|Only respond with data from the last function specified in the |
|Timeout override option (in ms). Only implement in calls that need more time to complete. Otherwise, by default SkyCiv will use smarter timeout times based on the function and model size attempted|
|Returns a log of the API processes, useful for debugging|
|Longer API calls can be returned to the user via a user-defined webhook URL. Include a URL here and your response will be sent here rather than back to the client|
validate_input property indicates if your input should be verified. If
true is provided, a fast and descriptive response will be returned if there is any issues with the input. It is not recommended to omit this key (or use
false) unless you are confident of the API call input data.
The API response contains the following components:
response(object) - Contains the data from the final function and some other useful information.
functions(array) - Each object in this array provides results for the respective function.
To keep the response size down, you can set
true. This means you will only receive the response object. This will contain the
data from the last function called.
response_data_only defaults to
functions property takes an
array of objects - each object defines a function to be executed. The functions should be in order of desired execution.
|Omits data object from the response for the respective function.|
The following is a list of available functions: