API

System APIs

POST system/api/api-operations

Creates a new Api Operation

HTTP method POST
URI https://api.rambase.net/system/api/api-operations
Supported formats Xml, Html, Json (ex. $format=json)
Successful HTTP status code 201
API resource identifier 1698, version 14

The following body must be added to the request. Mouse over fieldnames for description and other useful information about the fields. Note that fields in bold are required/mandatory.

Format:
1
<ApiOperation>
2
     <Name
Name

Required/mandatory field

Name of the Api Operation

>
{String}</Name>
3
     <Description
Description

Description of the Api Operation

This field is optional.

>
{String}</Description>
4
     <Program
Program

Required/mandatory field

Program (COS/RES) of this operation. Using RES requires that the operation is explicitly defined as a resource. ProgramNumber should match the resource number of the explicitly defined resource.

>
{String}</Program>
5
     <ProgramId
ProgramId

If Program is COS, then this number is a COS. If Program is RES, then this number is the explicitly defined operation resource.

This field is optional.

>
{Integer}</ProgramId>
6
     <Namespace
Namespace

Namespace of the Api Operation

This field is optional.

>
{String}</Namespace>
7
     <MutexDefinition
MutexDefinition

The mutual exclusion (mutex) definition/formula. Can contain unexpanded parameters.

This field is optional.

>
{String}</MutexDefinition>
8
     <Permission
Permission

This field is optional.

>
9
          <PermissionId
PermissionId

Permission identifier

This field is optional.

>
{Integer}</PermissionId>
10
     </Permission>
11
     <AccessStatements
AccessStatements

This field is optional.

>
12
          <AccessStatement
AccessStatement

This field is optional.

>
13
               <LineNumber
LineNumber

Line number of access statement

This field is optional.

>
{Integer}</LineNumber>
14
               <StatementType
StatementType

Statement type of the access statement (ex. IF, THROW, AND, OR)

This field is optional.

>
{String}</StatementType>
15
               <FieldSource
FieldSource

Source of field (ex. DOC, SYS)

This field is optional.

>
{String}</FieldSource>
16
               <Field
Field

Value of field (ex. DOC, PID )

This field is optional.

>
{String}</Field>
17
               <Operator
Operator

Operator of comparison (ex. EQ, NE, LT, GE)

This field is optional.

>
{String}</Operator>
18
               <ValueSource
ValueSource

Source of value (ex. DOC, SYS, blank)

This field is optional.

>
{String}</ValueSource>
19
               <Value
Value

Value to compare with. If ValueSource is given, Value can be field of source (ex. PID, DOCTYPE)

This field is optional.

>
{String}</Value>
20
               <ParentLineNumber
ParentLineNumber

Reference to parent statement identified with LineNumber

This field is optional.

>
{Integer}</ParentLineNumber>
21
          </AccessStatement>
22
     </AccessStatements>
23
</ApiOperation>
1
{
2
     "apiOperation": {
3
          "name
Name

Required/mandatory field

Name of the Api Operation

":
"{String}",
4
          "description
Description

Description of the Api Operation

This field is optional.

":
"{String}",
5
          "program
Program

Required/mandatory field

Program (COS/RES) of this operation. Using RES requires that the operation is explicitly defined as a resource. ProgramNumber should match the resource number of the explicitly defined resource.

":
"{String}",
6
          "programId
ProgramId

If Program is COS, then this number is a COS. If Program is RES, then this number is the explicitly defined operation resource.

This field is optional.

":
"{Integer}",
7
          "namespace
Namespace

Namespace of the Api Operation

This field is optional.

":
"{String}",
8
          "mutexDefinition
MutexDefinition

The mutual exclusion (mutex) definition/formula. Can contain unexpanded parameters.

This field is optional.

":
"{String}",
9
          "permission
Permission

This field is optional.

":
{
10
               "permissionId
PermissionId

Permission identifier

This field is optional.

":
"{Integer}"
11
          },
12
          "accessStatements
AccessStatements

This field is optional.

":
[
13
               {
14
                    "lineNumber
LineNumber

Line number of access statement

This field is optional.

":
"{Integer}",
15
                    "statementType
StatementType

Statement type of the access statement (ex. IF, THROW, AND, OR)

This field is optional.

":
"{String}",
16
                    "fieldSource
FieldSource

Source of field (ex. DOC, SYS)

This field is optional.

":
"{String}",
17
                    "field
Field

Value of field (ex. DOC, PID )

This field is optional.

":
"{String}",
18
                    "operator
Operator

Operator of comparison (ex. EQ, NE, LT, GE)

This field is optional.

":
"{String}",
19
                    "valueSource
ValueSource

Source of value (ex. DOC, SYS, blank)

This field is optional.

":
"{String}",
20
                    "value
Value

Value to compare with. If ValueSource is given, Value can be field of source (ex. PID, DOCTYPE)

This field is optional.

":
"{String}",
21
                    "parentLineNumber
ParentLineNumber

Reference to parent statement identified with LineNumber

This field is optional.

":
"{Integer}"
22
               }
23
          ]
24
     }
25
}

The query string is placed after the resource URL, seperated with a questionmark (?). The query string is composed of a series of query parameters with values. See the page about query parameters on how to use these parameters.

$access_token String, optional After successful login you get an access token which needs to be provided in all API requests. Even though it is possible to pass this token as query parameter, we recommended passing it using the HTTP request header as described in Authorization. Note that all access tokens have an expiration time.
$db String, optional Set the database/company for the request
$useMinimumVersion Integer, optional Used to run a new version of an API resource when your API client is running a deprecated API resource. See the Breaking changes page for more information.
$lang String, optional Specifies the language used in the response, following the 3-letter ISO-639-1 [lll]

Read more about filters and sorting on how to use filter parameters and named filters.

Read more about filters and sorting on how to use sortable parameters

Requesting this resource will yield the following response. Mouse over fieldnames (or fieldgroups) for descriptions and other useful information about the fields.

Please note that some fields may be removed from the response, based on user roles/duties/permissions.

Format:
1
<ApiOperation>
2
     <ApiOperationId
ApiOperationId

Api operation identifiers

>
{Integer}</ApiOperationId>
3
</ApiOperation>
1
{
2
     "apiOperation": {
3
          "apiOperationId
ApiOperationId

Api operation identifiers

":
"{Integer}"
4
     }
5
}

List of available operations/actions for this resource.
See the operations documentation for more information about API operations.

Possible error codes the response might return:

Error 101015 HTTP 404 Permission not found
Error 101420 HTTP 404 Setting definition not found
Error 100428 HTTP 400 The operator is not valid: {0}
Error 100427 HTTP 400 ParentLineNumber not found: {0}