eDOCS REST API - token timeout
Answers
-
To refresh the X-DM-DST token you must submit the following request:
POST …edocsapi/v1.0/refresh?library=<primary library>
With a payload containing the SESSION_AUTHORIZATION returned in the reply to the initial connect
Example:
Future refresh requests should use the SESSION_AUTHORIZATION returned from the previous refresh request
1 -
Btw, how can I configure "refresh" post endpoint? There is no documentation about that issue.
I understand that "SESSION_AUTHORIZATION" must we set as a parameter at the end of the API code and I should refer it from the "refresh" endpoint but I have no idea how to configure it in a proper way.
Should I include also "X-DM-DST" token as a parameter? How can I configure it on the security scheme?
0 -
There is nothing to configure.
POST …edocsapi/v1.0/refresh?library=
<primary library>
The SESSION_AUTHORIZATION is sent as the payload of the POST request and the X-DM-DST is sent like all other requests, as a header or cookie from the browser
0 -
POST …edocsapi/v1.0/refresh?library=
<primary library>
Where the "…" refers to the location of your REST API
0 -
Could u please share the API code including the refresh endpoint? I'll test it on Swagger editor.
0 -
If you provide an example of your request to your REST API, I will edit it for you
0 -
There is no "refresh" endpoint as Documentation:
For example, this is the "connect" endpoint:
"/connect": {
"post": {
"tags": [
"connection"
],
"summary": "Connect to the DM Server and get key information in the response",
"description": "Connect to one of the libriaries found in the response to the **libraries** request.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"userid": {
"type": "string"
},
"password": {
"type": "string"
},
"library": {
"type": "string"
}
},
"example": {
"userid": "DemoUserId",
"password": "DemoPassword",
"library": "DemoLibrary"
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Expected response to a valid request",
"headers": {
"Set-Cookie": {
"schema": {
"type": "string"
}
}
},
"content": {
"application/json": {}
}
},
"default": {
"description": "unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
}0 -
You send all requests to the same REST API. The previous examples show the refresh request going to the my REST API where all other requests were sent.
0 -
Sorry, I do not underastand the issue.
I download the API:
I test it on Swagger editor and it works until the token expires.
Btw, the "X-DM-DST" is always the same and I got it from F12 mode at website login as Set-Cookie.
0 -
Yes, the X-DM-DST will be the same until refreshed
If you are using the Swagger editor you should be able to use the POST request and supply the SESSION_AUTHORIZATION obtained from the initial connect request.
1 -
Could u please paste the full "refresh" endpoint JSON configuration?
Just as I posted "connect" endpoint… including properties, response, parameters…
0 -
"/refresh": {
"post": {
"tags": ["connection"],
"summary": "Refresh existing connection and get key information in the response",
"description" : "Refesh existing connection and obtain a new information for future requests.",
"security": [{"eDOCS_Authorization":[]}],
"parameters": [
{"$ref": "#/components/parameters/Library"}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"SESSION_AUTHORIZATION": {"type": "string"}
},
"example": {
"SESSION_AUTHORIZATION": "8b3b19bc113410d88a16f82dafa5cg3"
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Collection of activities",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RefreshResponse"
}
}
}
},
"default": {
"description": "unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},0 -
"RefreshResponse" : {
"description": "Collection of items based on the provided criteria",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"SESSION_DURATION": {"type": "integer"},
"SESSION_AUTHORIZATION": {"type": "string"},
"SESSION_TIMESTAMP": {"type": "string"},
"X-DM-DST": {"type": "string"}
}
}
}
},0
Categories
- All Categories
- 122 Developer Announcements
- 53 Articles
- 151 General Questions
- 147 Thrust Services
- 56 OpenText Hackathon
- 35 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 917 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 181 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories