The details to create a REST API definition.
Create a REST API definition
Creates a new REST API definition that is based on the specified content.
1{2 "creationTimeStamp": "2023-01-15T10:30:00.000Z",3 "modifiedTimeStamp": "2023-01-15T10:30:00.001Z",4 "createdBy": "sasdemo",5 "modifiedBy": "sasdemo",6 "id": "c3d4e5f6-a7b8-9012-cdef-012345678901",7 "name": "ExampleAPI",8 "description": "Get items",9 "majorRevision": 1,10 "minorRevision": 0,11 "signature": [12 {13 "name": "responseBody",14 "dataType": "string",15 "direction": "output"16 },17 {18 "name": "responseStatusCode",19 "dataType": "integer",20 "direction": "output"21 }22 ],23 "queryParams": [],24 "requestHeaders": [],25 "responseHeaders": [],26 "method": "GET",27 "uriTemplate": "https://example.com/items",28 "authorization": {29 "authorizationType": "NONE"30 },31 "folderType": "myFolder",32 "checkout": false,33 "locked": false,34 "revisionId": "e5f6a7b8-c9d0-1234-ef01-23456789abcd",35 "revisionUri": "/decisions/restApiDefinitions/c3d4e5f6-a7b8-9012-cdef-012345678901/revisions/e5f6a7b8-c9d0-1234-ef01-23456789abcd",36 "links": [37 {38 "method": "GET",39 "rel": "up",40 "href": "/decisions/restApiDefinitions",41 "uri": "/decisions/restApiDefinitions",42 "type": "application/vnd.sas.collection"43 },44 {45 "method": "GET",46 "rel": "self",47 "href": "/decisions/restApiDefinitions/c3d4e5f6-a7b8-9012-cdef-012345678901",48 "uri": "/decisions/restApiDefinitions/c3d4e5f6-a7b8-9012-cdef-012345678901",49 "type": "application/vnd.sas.decision.rest.api.definition"50 },51 {52 "method": "GET",53 "rel": "alternate",54 "href": "/decisions/restApiDefinitions/c3d4e5f6-a7b8-9012-cdef-012345678901",55 "uri": "/decisions/restApiDefinitions/c3d4e5f6-a7b8-9012-cdef-012345678901",56 "type": "application/vnd.sas.summary"57 },58 {59 "method": "DELETE",60 "rel": "delete",61 "href": "/decisions/restApiDefinitions/c3d4e5f6-a7b8-9012-cdef-012345678901",62 "uri": "/decisions/restApiDefinitions/c3d4e5f6-a7b8-9012-cdef-012345678901"63 },64 {65 "method": "PUT",66 "rel": "update",67 "href": "/decisions/restApiDefinitions/c3d4e5f6-a7b8-9012-cdef-012345678901",68 "uri": "/decisions/restApiDefinitions/c3d4e5f6-a7b8-9012-cdef-012345678901",69 "type": "application/vnd.sas.decision.rest.api.definition",70 "responseType": "application/vnd.sas.decision.rest.api.definition"71 },72 {73 "method": "GET",74 "rel": "revisions",75 "href": "/decisions/restApiDefinitions/c3d4e5f6-a7b8-9012-cdef-012345678901/revisions",76 "uri": "/decisions/restApiDefinitions/c3d4e5f6-a7b8-9012-cdef-012345678901/revisions",77 "type": "application/vnd.sas.collection"78 }79 ],80 "version": 181}| Name | Type | Required | Description |
|---|---|---|---|
parentFolderUri | string</folders/folders/{parentFolderId}> | false | The folder in which the new REST API definition is placed. |
fromRevisionUri | string</decisions/restApiDefinitions/{restApiDefinitionId}/revisions/{revisionId}> | false | This value specifies the URI of the revision for the REST API definition from which the new REST API definition is being created. This property enables you to trace the lineage of a REST API definition. |
The representation of a REST API definition.
| Name | Type | Required | Description |
|---|---|---|---|
id | string | false | The string ID for the REST API definition. |
creationTimeStamp | string<date-time> | false | The timestamp for when the REST API definition was created. |
createdBy | string | false | The ID of the user who created the REST API definition. |
modifiedTimeStamp | string<date-time> | false | The timestamp for when the REST API definition properties were modified. |
modifiedBy | string | false | The ID of the user who modified the REST API definition. |
name | string | true | The name for the REST API definition. <= 100 characters |
description | string | false | The description for the REST API definition. <= 1000 characters |
majorRevision | integer | false | The major version number of the current revision of the REST API definition. This value is assigned by the service. The user only has control of whether the major number or minor number is incremented when creating a new revision. |
minorRevision | integer | false | The minor version number of the current revision of the REST API definition. This value is assigned by the service. The user only has control of whether the major number or minor number is incremented when creating a new revision. |
locked | boolean | false | A flag that indicates whether the content that is being viewed is locked or editable. |
folderType | string | false | The type of folder where the REST API definition is located. |
checkout | boolean | false | A flag that indicates whether the REST API definition is a user's working copy of another REST API definition. |
sourceRevisionUri | string | false | The URI of the REST API definition revision from which this REST API definition is being created. |
revisionId | string | false | The string ID for a REST API definition revision. This string is available only if the operation that returns this object has to handle a revision. |
revisionUri | string | false | The URI for a REST API definition revision. This is available only if the operation that returns this object has to handle a revision. |
copyTimeStamp | string<date-time> | false | The timestamp for when the REST API definition revision was copied. |
signature | array [Segmentation Tree Signature Term] | false | The set of terms that are local to this REST API definition with input and output behavior. |
method | string<enumeration> | true | The HTTP method for the REST API definition. Allowed values: GETPOSTHEAD |
uriTemplate | string | true | The request path for the REST API definition. |
requestBody | string | false | The content that is sent as the body of the request for the REST API definition. <= 4000 characters |
requestHeaders | array [Request Header for a REST API Definition] | false | The set of key-value pairs that are sent as headers within the request for the REST API definition. |
queryParams | array [Query Parameter for a REST API Definition] | false | The set of key-value pairs that are appended to the end of the request path within the request for the REST API definition. |
responseHeaders | array [Response Header for a REST API Definition] | false | The set of key-value pairs that are received as headers within the response for the REST API definition. |
authorization | oneOfNone Authorization Type for a REST API DefinitionSAS OAUTH Authorization Type for a REST API DefinitionAuthorization by Bearer Tokens for a REST API DefinitionQuery Parameter Authorization Type for a REST API DefinitionHeader Authorization Type for a REST API Definition | true | The authorization details for the REST API definition. |
links | array [Link] | false | Links to related resources or operations. |
version | integer | false | The version number of the domain representation. This representation is version 1. |
| Status | Meaning | Description | ||
|---|---|---|---|---|
| 201 | Created | The REST API definition was created. | Headers | Schema |
| 400 | Bad Request | The request was invalid. | Headers | Schema |