api/v1/content
The transport content API allows you to work with items available on the Content Network.
-
Get items and item details from the Content Network.
-
Move or delete private items on the Content Network.
-
Get or modify item permissions.
-
Create import and export jobs.
-
Get job status.
Prerequisites
You have to pass X-CSRF token, x-sap-sac-custom-auth=true parameter, and the access token to authorize your client application while sending any request to the API.
Follow these steps:
-
Create a new OAuth client. Follow the steps in the topic Managing OAuth Clients to create a new OAuth client.
-
Authorize the OAuth client. Follow the steps in the section Authorization for API access OAuth Clients of the topic Managing OAuth Clients to authorize the OAuth client.
-
Add the X-CSRF token.
-
Issue a GET request to the API endpoint. Example endpoint: https://<TENANT_URL>/api/v1/csrf
You must include the following headers with your GET request:-
Authorization: Bearer <Access_Token>
-
x-sap-sac-custom-auth: true
-
x-csrf-token: fetch
-
-
Retrieve the value of the HTTP response header named x-csrf-token.
-
-
In an HTTP request that you make to the API, add the following:
-
Authorization: Bearer <Access_Token>
-
x-sap-sac-custom-auth: true
-
x-csrf-token: <x-csrf_Token_Value>
-
Alternatively, you can also follow the steps for Configuring OAuth 2.0 Authorization Code Grant Workflow in Setting Up Authentication. You would then require x-csrf token if you're sending POST, PATCH, UPDATE, and DELETE requests. You can follow step 3 mentioned above and eliminate the x-sap-sac-custom-auth parameter to generate an x-csrf-token for authorization code grant workflow.
-
Authorization: Bearer <Access_Token>
-
x-csrf-token: <x-csrf_Token_Value>
API Endpoints and Parameters
Private Package
|
Endpoint |
Description |
|---|---|
|
Get a filtered list of private items. |
|
|
Export or import items from the Content Network. |
|
|
Get the status of an import or export job. |
|
|
Delete a private item. |
|
|
Move a private item. |
|
|
Get the details for a specific private item. |
|
|
Get or edit permissions for a private item. |
Public Package
|
Endpoint |
Description |
|---|---|
|
Get all public items, or a filtered list of items. |
|
|
Get the details for a specific public item. |
|
|
Get or modify the permissions for a public item. |
Additional Information
|
Endpoint |
Description |
|---|---|
|
A list of package tags for private and public packages. |
|
|
A list of status codes returned by the API. |
Getting Filtered List of Permitted Items
You can add tags in the request body to filter the list of permitted items.
API Request Details
|
URL |
/api/v1/content/ |
|
Request Type |
POST |
|
Content Type |
application/json |
|
Query Parameters |
Refer to the table below. |
|
Name |
Description |
Type |
Default Value |
Supported Values |
|---|---|---|---|---|
|
Permissions |
List the items that the user has specific permissions for |
String |
list |
The default value is list. The supported values are list, read, write, and delete. Multiple values can be sent using the & operator. |
|
itemType |
Specify the type of items to be fetched |
String. |
ALL |
The supported values are:
|
|
tags |
Specifies the tag IDs to filter the items |
String Multiple values can be sent using "&" operator. |
[] |
You can check the supported tags with their IDs in Predefined Content Network Package Tags. |