Publish Subscribe API Overview
Describes the API specifications for getting Publish Subscribe modules.
Authentication
SAP Fieldglass supports common OAuth 2.0 scenarios such as those for web server, installed, and client-side applications.
For detailed information on how to obtain OAuth 2.0 client credentials from your SAP Fieldglass representative and authorization to connect to SAP Fieldglass REST APIs, as well as details on how the REST APIs work, see the SAP Fieldglass REST API Integrations General Reference Guide at https://help.sap.com/viewer/1befd97581554895bb7fcfca6049f53e/cloud/en-US.
Base URL
https://<SAP Fieldglass envionment URL>/api/v1/admin/v1/
Methods
Publish Subscribe Modules
| HTTP Method | Action | URI |
|---|---|---|
| GET | Get Cost Center Data | /costcenter/<costcenterID> |
| GET | Get User Data | /users/<userID>?_loadInActive=true |
| GET | Get Buyer Business Unit Data | /buyer-business-units/<buyer-business-unitsID>?_loadInActiveObjects=true |
| GET | Get Site Data | /sites/<siteID> |
| GET | Get Publish Subscribe Reasons | /pubsub-reasons/<pubsub-reasonID> |
| GET | Get Attachments | /attachments/<attachmentID> |
Common Headers
Common Request Headers
| Header Name | Required | Example Value | Data Type | Description |
|---|---|---|---|---|
| content-type | Yes |
application/json |
String | The media type of the resource. |
| authorization | Yes | bearer [access token] | String | Security credentials for a login session. |
| X-ApplicationKey | Yes | JwVj98gLJm7Dle5IGL7nnrvNhrO | String | Client-specific application key. |
Common Response Headers
| Element Name | Data Type | Description |
|---|---|---|
| server | String | Server name. |
| responseStatus | String | The status of the request. |
| noOfRecordsPresent | Numeric | The total number of records in the data base. |
| noOfRecordsServed | Numeric | The total number of records that were returned. |
| moreRecordsExists | Boolean | Indicates if more records exist in the data base that haven't been returned. |
| localeString | String | The defined language. |
| version | String | SAP Fieldglass API version. |
Common Status and Error Codes
| Code | Reason | Message | Description |
|---|---|---|---|
| 200 | Success response | OK | The request is valid and the response body has been created successfully. |
| 400 | Error response | Bad request | The request is invalid. |
| 401 | Error response | Unauthorized | The email address & password used for authentication are wrong or expired. |
| 403 | Error response | Forbidden or insufficient authorization | The email address used for authentication isn’t registered. |
| 404 | Error response | Not found | The request is valid and the response body couldn’t be found. |
| 500 | Error response | Unexpected system error | The request is valid and the response body encountered a system error. Please contact your system administrator. |