Show Options on how to login to OpenText © Content Server.
Advantage: only 1 URL is used to login and call RestAPI
Disadvantage: Dialog User is used (credentials could be used to login via browser)
OpenText Content Server Ticket
Example: 375959889....23cbe80
Advantage: Ticket can be used to also call other resources than Content Server RestAPI
Disadvantage: Dialog User is used (credentials could be used to login via browser)
OpenText Directory Service Ticket
Example: *OTDSSSO*AahBQlRBSURTTl...hkAAA*
Advantage: Auth Client instead of dialog User is used (credentials can NOT be used to login via browser)
Disadvantage: Token is created in OTDS, but call is done to RestAPI of Content Server (2 different URLs)
Bearer Token
Example: eyJraWQiOiIwOGJiNTYzM...
Login Options
How to login with Username / Password to OpenText © Content Server.
POST
http[s]://<content-server>:<port>/<otcs-path>/api/v1/auth https://otcs.phil.local/otcs/cs/api/v1/auth
username=<username> password=<pw>
or
{
"ticket": "3bf4f1883f3e....35c0dd83"
}
Get OTCSTicket • Login with Username / Password
OT_API
s#cretor url-encoded:
s%23cret
How to login with Username / Password to Content Server via OpenText © Directory Service.
POST
http[s]://<directory-server>:<port>/otdsws/v1/authentication/credentials https://otds.phil.local/otdsws/v1/authentication/credentials
{
"user_name": "<username>",
"password": "<pw>"
}
application/json;charset=utf-8
{
"token": "6F74647...",
"user_id": "OT_API@Content Server Members",
"ticket": "*OTDSSSO*AbhBQlFPMHhDbXo3QW...",
"resourceID": null,
"failureReason": null,
"password_expiration_time": 0,
"continuation": false,
"continuationContext": null,
"continuationData": null
}
Get OTDSTicket • Login with Username / Password via OTDS
How to login with OAuth2 Client / Client Secret to Content Server via OpenText © Directory Service.
Create an OAuth2 Client in OTDS: oauth2 client id and client secret is required.
POST
http[s]://<directory-server>:<port>/otdsws/oauth2/token https://otds.phil.local/otdsws/oauth2/token
Basic <base64String> Example: Basic T0FVVEhfQVBJOnMjY3JldA==
grant_type=client_credentials requested_token_type=urn:ietf:params:oauth:token-type:access_token
application/x-www-form-urlencoded
{
"access_token": "eyJraWQi...bOw",
"token_type": "Bearer",
"expires_in": 86400
}
Get Bearer Token • Login with OAuth2 Client / Client Secret via OTDS
How to get a Node via the API of OpenText © Content Server.
GET
http[s]://<content-server>:<port>/<otcs-path>/api/v2/nodes/<nodeid> https://otcs.phil.local/otcs/cs/api/v2/nodes/2000
fields=properties%7Bid%2Cname%7D (properties{id,name})
fields=categories
fields=permissions
OTCSTicket : f87a0cad72...9a42ebe8bdaea Content-Type : application/json;charset=utf-8
{
"links": {...},
"results": {
"data": {
"categories": [],
"permissions": [],
"properties": {
"id": 2000,
"name": "Enterprise"
}
}
}
}
Get Node Information • using OTCSTicket
fields=properties{id,name} (must be URL encoded)
How to get a Node via the API of OpenText © Content Server.
GET
http[s]://<content-server>:<port>/<otcs-path>/api/v2/nodes/<nodeid> https://otcs.phil.local/otcs/cs/api/v2/nodes/2000
fields=properties%7Bid%2Cname%7D (properties{id,name})
fields=categories
fields=permissions
OTDSTicket : *OTDSSSO*AbxBQlM4Q...qTBmb_7rqgMi0AAA** Content-Type : application/json;charset=utf-8
{
"links": {...},
"results": {
"data": {
"categories": [],
"permissions": [],
"properties": {
"id": 2000,
"name": "Enterprise"
}
}
}
}
Get Node Information • using OTDSTicket
fields=properties{id,name} (must be URL encoded)
How to get a Node via the API of OpenText © Content Server.
GET
http[s]://<content-server>:<port>/<otcs-path>/api/v2/nodes/<nodeid> https://otcs.phil.local/otcs/cs/api/v2/nodes/2000
fields=properties%7Bid%2Cname%7D (properties{id,name})
fields=categories
fields=permissions
Authorization : Bearer ey... Content-Type : application/json;charset=utf-8
{
"links": {...},
"results": {
"data": {
"categories": [],
"permissions": [],
"properties": {
"id": 2000,
"name": "Enterprise"
}
}
}
}
Get Node Information • using Bearer Token
fields=properties{id,name} (must be URL encoded)