Skip to end of metadata
Go to start of metadata

REST API Alphabetical List

AddCertificate   
CreateAccount  
CreateChannel
CreateStore 
DeleteAccount 
DeleteDocument
DeleteGroup
DeleteSavedQuery
DeleteSchema
DeleteScript
DeleteStore
DeleteToken
DeleteUser 
GetAccount     
GetChannel
GetFile
GetInvalidTokens
GetSavedQuery
GetSchema
GetScript
GetScriptLogsGetSchema
GetUser 
ListAccounts 
ListConfiguration
ListGroups
ListSavedQueries
ListSchemas
ListScripts
ListStores
ListUsers 
ModifyAccount 
PushNotification
Query
RemoveCertificate
RemoveChannel
RunScript
SaveConfiguration
SaveDocument
SaveGroup
SaveQuery
SaveSchema
SaveScript
SaveUser
SendEmail
SubscribeTokens
TagTokensAsInvalidSendEmail
Transaction
UnsubscribeTokens
UpdateCertificate
UpdateChannelTransaction
VerifyCredentials 

API Common Request Parameters

This is the list of general request parameters that can be sent with all requests.

Name

Description

Required

Default

Possible Values

apsws.time

A UNIX timestamp denoting the current time when the request is issued.

Yes

 

UNIX timestamp

apsws.authMode

Specifies the type of signature passed in the request.

No

complex

simple
complex

apsws.authSig

Signature of the request. Optionally, a user request can be signed with a token.

No

 

Refer to "Request Authentication section"

apsws.responseType

Specifies the format of the response of the current request.

No

xml


xml
json

apsws.user

The user issuing the current request. If not specified, then it is assumed that the request is issued by the owner.

No

 

The login of a user.

apsdb.runAs

Allows an owner to issue a request as if he were the specified user.

No

 

The login of a user.

apsws.jc

Specifies the name of a client side javascript function to be executed upon completion of the current request. The response of the request will be passed as the only parameter of this callback function.

No

 

 

apsdb.redirHref

Specifies the url to redirect the client to upon completion of the request. Sets the window.name to the response of the request. Requires the apsdb.callback request parameter.

No

 

 

apsdb.callback

This parameter is required when the apsdb.redirHref is sent to the request. Passes the parameter called "callback" to the redirected page and sets its value to the value of this request parameter.

Conditional

 

 

apsdb.force200ResponseStatus

Controls whether or not the response status is set to 200 upon failure.

No

false

true
false

apsws.customField

A request parameter that may contain any data that will not be processed by apstrata. It can be used to send data to third party services.

No

 

 

API Common Response Elements

The following is a JSON representation of the response elements that are common to all APIs. The XML representation follows the same structure; however, for the sake of documentation, we will be using the JSON response format.

{
	"response": {
		"metadata": {
			"requestId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
			"status": "success | failure",
			"errorCode": "Logical Error Code",
			"errorDetail": "Logical Error Message",
			"statusCode": "HTTP Response Code"
		}
	}
}

 

The "response" element is the root one for all responses. The "metadata" element is also a common one with the following info:

  • "requestId": a unique identifier for each request
  • "status": indicates whether the request succeeded or failed. The possible values are "success" or "failure"
  • "errorCode": error code identifying a logical error; this element is returned only in the case of a logical error; please refer to each API for specific error codes.
  • "errorDetail": error message describing a logical error; this element is returned only in the case of a logical error; please refer to each API for specific error messages.
  • "statusCode": HTTP response code, such as 200 for success.

API Common Logical Error Codes

The following is a list of logical errors that are common to all APIs.

Error CodeError Description
ACCOUNT_SUSPENDEDThe account making the request is suspended
ACTION_REQUIREDNo action is sent in the request
AUTHENTICATION_KEY_REQUIREDNo authentication key is sent in the request
CALLBACK_MISSINGapsdb.redirectHref request parameter is specified without specifying apsdb.callback
DUPLICATE_PARAMETER_VALUEDuplicate values are not allowed for specific request paramneters
INVALID_ACTIONThe action specified in the request in invalid
INVALID_PARAMETERInvalid request parameter across all APIs
INVALID_REQUESTThe request is invalid. For example, an owner asking for a token
INVALID_SIGNATUREThe signature specified is not valid
The account making the request is flagged as deleted 
INVALID_TOKENThe token specified in the request in invalid
INVALID_URIMissing authentication key or action in the request
INVALID_USERInvalid user signing the request
MALFORMED_REFERERInvalid originating referrer
PERMISSION_DENIEDNo permission to call a certain API
SIGNATURE_REQUIREDNo signature is sent in the request
TIMESTAMP_REQUIREDNo timestamp is sent in the request
  • No labels