Create a revision for a REST API definition

post/restApiDefinitions/{restApiDefinitionId}/revisions

Creates a new revision for the REST API definition.

Request Samples

Response Samples

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": "e5f6a7b8-c9d0-1234-ef01-23456789abcd",
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",
28 "authorization": {
29 "authorizationType": "NONE"
30 },
31 "folderType": "myFolder",
32 "checkout": false,
33 "locked": false,
34 "links": [
35 {
36 "method": "GET",
37 "rel": "up",
38 "href": "/decisions/restApiDefinitions/c3d4e5f6-a7b8-9012-cdef-012345678901/revisions",
39 "uri": "/decisions/restApiDefinitions/c3d4e5f6-a7b8-9012-cdef-012345678901/revisions",
40 "type": "application/vnd.sas.collection"
41 },
42 {
43 "method": "GET",
44 "rel": "self",
45 "href": "/decisions/restApiDefinitions/c3d4e5f6-a7b8-9012-cdef-012345678901/revisions/e5f6a7b8-c9d0-1234-ef01-23456789abcd",
46 "uri": "/decisions/restApiDefinitions/c3d4e5f6-a7b8-9012-cdef-012345678901/revisions/e5f6a7b8-c9d0-1234-ef01-23456789abcd",
47 "type": "application/vnd.sas.decision.rest.api.definition"
48 },
49 {
50 "method": "GET",
51 "rel": "alternate",
52 "href": "/decisions/restApiDefinitions/c3d4e5f6-a7b8-9012-cdef-012345678901/revisions/e5f6a7b8-c9d0-1234-ef01-23456789abcd",
53 "uri": "/decisions/restApiDefinitions/c3d4e5f6-a7b8-9012-cdef-012345678901/revisions/e5f6a7b8-c9d0-1234-ef01-23456789abcd",
54 "type": "application/vnd.sas.summary"
55 },
56 {
57 "method": "DELETE",
58 "rel": "delete",
59 "href": "/decisions/restApiDefinitions/c3d4e5f6-a7b8-9012-cdef-012345678901/revisions/e5f6a7b8-c9d0-1234-ef01-23456789abcd",
60 "uri": "/decisions/restApiDefinitions/c3d4e5f6-a7b8-9012-cdef-012345678901/revisions/e5f6a7b8-c9d0-1234-ef01-23456789abcd"
61 }
62 ],
63 "version": 1
64}

Path Parameters

NameTypeRequiredDescription
restApiDefinitionId
string
true

The identifier for a REST API definition.

Query Parameters

NameTypeRequiredDescription
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 created. This property enables you to trace the lineage of a REST API definition.

revisionType
string
false

This value determines how the server generates the major or minor revision numbers. Valid values are 'major' or 'minor'. If 'major' is specified, the next available major revision number is initiated. For example, if the REST API definition has revisions 1.0, 1.1, 1.2, 2.0, 2.1, when you create a new major revision, the result is 3.0. If 'minor' is specified, the next available minor revision number is reserved based on the existing revisions. The default value is 'minor', if not specified.

Allowed values:
majorminor
Default:
minor

Request Body

The representation of a REST API definition.

NameTypeRequiredDescription
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.

Responses

StatusMeaningDescription
201Created

A revision of the REST API definition was created.

HeadersSchema
400Bad Request

The request was invalid.

HeadersSchema
404Not Found

No REST API definition exists at the requested path.

HeadersSchema