Libraries
Request Libraries
Performing a GET command returns the library objects for the specified account.
| Method | URL | Description |
|---|---|---|
| GET | /DGSCoreManagement/api/rest/library/accounts/{accountId}/libraries | The GET method submits the accountId and returns all associated libraries. |
| Name | Type | Constraints | Description |
|---|---|---|---|
| url | string | required | /DGSCoreManagement/api/rest/library/accounts/{accountId}/libraries Replace {accountId} with the value of the actual accountId. |
| Example | /DGSCoreManagement/api/rest/library/accounts/1/libraries |
||
| Code | Description |
|---|---|
| 200 | Successful
response Example: |
| 401 | Not Authorized |
| 404 | Libraries not found |
| 500 | Unexpected error |
Create a Library
Performing a POST command creates a library object for the specified account.
| Method | URL | Description |
|---|---|---|
| POST | /DGSCoreManagement/api/rest/library/accounts/{accountId}/libraries | The POST method submits the data from the body and returns the new library information (see example response). |
| Name | Type | Constraints | Description |
|---|---|---|---|
| url | string | required | /DGSCoreManagement/api/rest/library/accounts/{accountId}/libraries Replace {accountId} with the value of the actual accountId. |
| body | string | required |
librayName: a string value identifying the name of the library version: an integer value indicating the version of the library isDefault: a boolean value (true|false) indicating if the new library is to be the default library ownerAccount: an integer value indicating the accountId to associate the new library copyToChildOrgsPkg: a boolean value indicating if the library should be copied to the child orgs package notes: a string value containing any notes to associate with the new library |
| Example |
url:
body:
|
||
| Code | Description |
|---|---|
| 201 | Successful response Example: |
| 401 | Not Authorized |
| 404 | Invalid URL |
| 500 | Unexpected error |
Request Library Information
Performing a GET command returns information for the specified library.
| Method | URL | Description |
|---|---|---|
| GET | /DGSCoreManagement/api/rest/library/accounts/{accountId}/libraries/{libraryId} | The GET method submits the libraryId and returns the associated library information. |
| Name | Type | Constraints | Description |
|---|---|---|---|
| url | string | required |
|
| Example | /DGSCoreManagement/api/rest/library/accounts/1/libraries/32f95a3a-af1d-4ab8-81c0-a6be00b4a4f8 |
||
| Code | Description |
|---|---|
| 200 | Successful
response Example: |
| 401 | Not Authorized |
| 404 | Library not found |
| 500 | Unexpected error |
Update Library Information
Performing a PATCH command updates information for the specified library.
| Method | URL | Description |
|---|---|---|
| PATCH | /DGSCoreManagement/api/rest/library/accounts/{accountId}/libraries/{libraryId} | The PATCH method submits the libraryId with the body
content and returns the associated library
information. Note: Currently only the status parameter is
available to update. |
| Name | Type | Constraints | Description |
|---|---|---|---|
| url | string | required |
|
| body | string | required |
status: a string indicating the desired status for the library Options include:
|
| Example |
url:
body:
|
||
| Code | Description |
|---|---|
| 202 | Successful response Example
response: |
| 401 | Not Authorized |
| 404 | Library not found |
| 500 | Unexpected error |
Upload a Library
Performing a POST command uploads a library to the specified accountId.
| Method | URL | Description |
|---|---|---|
| POST | /DGSCoreManagement/api/rest/library/accounts/{accountId}/libraries/{libraryId}/upload | The POST method submits the body content to the specified account. |
| Name | Type | Constraints | Description |
|---|---|---|---|
| url | string | required |
|
| body | string | required |
|
| Example |
url:
body:
|
||
| Code | Description |
|---|---|
| 202 | Successful response |
| 400 | Bad Request |
| 401 | Not Authorized |
| 404 | Library not found |
| 500 | Unexpected error |
Delete a Library
The DELETE command allows you to delete an existing library within a specified account.
| Method | URL | Description |
|---|---|---|
| DELETE | /DGSCoreManagement/api/rest/library/accounts/{accountId}/libraries/{libraryId} | The DELETE method deletes the specified library object. Note: A
library can be deleted only if its status is
Undeployed. |
| Name | Type | Constraints | Description |
|---|---|---|---|
| url | string | required |
|
| Example |
url:
|
||
| Code | Description |
|---|---|
| 204 | Successful response |
| 401 | Not Authorized |
| 404 | Library not found |
| 500 | Unexpected error |
Request Allowed Accounts for a Library
The GET method allows you to retrieve the allowed accounts for a specified library.
| Method | URL | Description |
|---|---|---|
| GET | /DGSCoreManagement/api/rest/library/accounts/{accountId}/libraries/{libraryId}/allowedAccounts | The GET method returns the allowed accounts for a specified library object. |
| Name | Type | Constraints | Description |
|---|---|---|---|
| url | string | required |
|
| Example |
url:
|
||
| Code | Description |
|---|---|
| 200 | Successful
response Example: |
| 401 | Not Authorized |
| 404 | Library not found |
| 500 | Unexpected error |
Add Allowed Account to a Library
The POST method allows you to add a new account to the specified library.
| Method | URL | Description |
|---|---|---|
| POST | /DGSCoreManagement/api/rest/library/accounts/{accountId}/libraries/{libraryId}/allowedAccounts | The POST method submits the library array from the body. |
| Name | Type | Constraints | Description |
|---|---|---|---|
| url | string | required |
|
| body | string | required |
Multiple accounts can be associated simultaneously. |
| Example |
url:
body:
|
||
| Code | Description |
|---|---|
| 200 | Successful response Example
response: |
| 401 | Not Authorized |
| 404 | Library not found |
| 500 | Unexpected error |
Delete Account from a Library
The DELETE method allows you delete allowed accounts from a specified library.
| Method | URL | Description |
|---|---|---|
| DELETE | /DGSCoreManagement/api/rest/library/accounts/{accountId}/libraries/{libraryId}/allowedAccounts | The DELETE command deletes one or more allowed accounts from the specified library and then returns a list of all allowed accounts. |
| Name | Type | Constraints | Description |
|---|---|---|---|
| url | string | required |
|
| body | string | required |
|
| Example |
url:
body:
|
||
| Code | Description |
|---|---|
| 202 | Successful response Example
response: |
| 401 | Not Authorized |
| 404 | Library not found |
| 500 | Unexpected error |