DatasourceResource Resource

Resource for management of datasources

GET /datasource

List datasources.
The result can be filtered by

  • id
  • globalId
  • name
  • type
and sorted by
  • id
  • globalId
  • name
  • type

Request Parameters
name type description default constraints
page query Returned page, if paging is used. Paging starts with 1 1 int
pageSize query Page size for paging. If this is set to -1 no paging is used (all matching items are returned). Setting this to 0 will return no items. -1 int
q query Query string for filtering    
sort query Comma separated list of sorted attributes. Each attribute name may be prefixed with + for sorting in ascending order or - for sorting in descending order name  
Response Codes
code condition
200 List of datasources is returned.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json PagedDatasourceListResponse (JSON) response containing a list of datasources

Example

Request
GET /datasource
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "items" : [ { }, { } ],
  "hasMoreItems" : true,
  "numItems" : 12345,
  "perms" : {
    "property1" : [ "updateitems", "channelsync" ],
    "property2" : [ "updateitems", "importitems" ]
  },
  "stagingStatus" : {
    "property1" : {
      "packageName" : "...",
      "included" : true
    },
    "property2" : {
      "packageName" : "...",
      "included" : true
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

POST /datasource

Create new datasource

Request Body
media type data type description
application/json Datasource (JSON) datasource
Response Codes
code condition
200 Datasource was created.
400 No request body was sent.
400 Not all required fields had non-null values.
409 The given name is already in use by another datasource.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json DatasourceLoadResponse (JSON) response containing created datasource

Example

Request
POST /datasource
Content-Type: application/json
Accept: application/json

                
{
  "id" : 12345,
  "globalId" : "...",
  "type" : "SITEMINDER",
  "name" : "..."
}
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "datasource" : {
    "id" : 12345,
    "globalId" : "...",
    "type" : "SITEMINDER",
    "name" : "..."
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

DELETE /datasource/{id}

Delete a datasource

Request Parameters
name type description
id path datasource ID
Response Codes
code condition
204 Datasource {id} was deleted.
404 Datasource {id} does not exist.
409 Datasource {id} cannot be deleted, because it is used.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json object (JSON) empty response

Example

Request
DELETE /datasource/{id}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
...
                
              

GET /datasource/{id}

Get existing datasource

Request Parameters
name type description
id path datasource ID
Response Codes
code condition
200 Datasource {id} exists.
404 Datasource {id} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json DatasourceLoadResponse (JSON) response containing the datasource

Example

Request
GET /datasource/{id}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "datasource" : {
    "id" : 12345,
    "globalId" : "...",
    "type" : "SITEMINDER",
    "name" : "..."
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

PUT /datasource/{id}

Update a datasource

Request Parameters
name type description
id path datasource ID
Request Body
media type data type description
application/json Datasource (JSON) updated datasource data
Response Codes
code condition
200 Datasource {id} was updated.
400 No request body was sent.
404 Datasource {id} does not exist.
409 The given name is already in use by another datasource.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json DatasourceLoadResponse (JSON) response containing the updated datasource

Example

Request
PUT /datasource/{id}
Content-Type: application/json
Accept: application/json

                
{
  "id" : 12345,
  "globalId" : "...",
  "type" : "SITEMINDER",
  "name" : "..."
}
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "datasource" : {
    "id" : 12345,
    "globalId" : "...",
    "type" : "SITEMINDER",
    "name" : "..."
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /datasource/{id}/constructs

Get the constructs using the datasource.
The result can be filtered by

  • id
  • globalId
  • keyword
  • name
  • description
  • category
and sorted by
  • id
  • globalId
  • keyword
  • name
  • description
  • category

Request Parameters
name type description default constraints
id path datasource id    
page query Returned page, if paging is used. Paging starts with 1 1 int
pageSize query Page size for paging. If this is set to -1 no paging is used (all matching items are returned). Setting this to 0 will return no items. -1 int
q query Query string for filtering    
sort query Comma separated list of sorted attributes. Each attribute name may be prefixed with + for sorting in ascending order or - for sorting in descending order name  
Response Codes
code condition
200 Datasource {id} exists.
404 Datasource {id} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json ConstructList (JSON) response containing a list of constructs using the datasource

Example

Request
GET /datasource/{id}/constructs
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "items" : [ { }, { } ],
  "hasMoreItems" : true,
  "numItems" : 12345,
  "perms" : {
    "property1" : [ "deleteform", "importitems" ],
    "property2" : [ "createform", "updateinheritance" ]
  },
  "stagingStatus" : {
    "property1" : {
      "packageName" : "...",
      "included" : true
    },
    "property2" : {
      "packageName" : "...",
      "included" : true
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /datasource/{id}/entries

List entries of a datasource

Request Parameters
name type description
id path datasource id
Response Codes
code condition
200 List of entries is returned.
404 Datasource {id} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json DatasourceEntryListResponse (JSON) response containing a list of entries

Example

Request
GET /datasource/{id}/entries
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "items" : [ { }, { } ],
  "hasMoreItems" : true,
  "numItems" : 12345,
  "perms" : {
    "property1" : [ "edit", "edit" ],
    "property2" : [ "publishpages", "updateconstructs" ]
  },
  "stagingStatus" : {
    "property1" : {
      "packageName" : "...",
      "included" : true
    },
    "property2" : {
      "packageName" : "...",
      "included" : true
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

POST /datasource/{id}/entries

Create a datasource entry in the datasource

Request Parameters
name type description
id path datasource id
Request Body
media type data type description
application/json DatasourceEntryModel (JSON) datasource entry
Response Codes
code condition
200 Entry was created.
400 No request body was sent.
400 Not all required fields had non-null values.
404 Datasource {id} does not exist.
409 One of the given values is already used by another entry.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json DatasourceEntryResponse (JSON) response containing the created entry

Example

Request
POST /datasource/{id}/entries
Content-Type: application/json
Accept: application/json

                
{
  "id" : 12345,
  "globalId" : "...",
  "dsId" : 12345,
  "key" : "...",
  "value" : "..."
}
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "entry" : {
    "id" : 12345,
    "globalId" : "...",
    "dsId" : 12345,
    "key" : "...",
    "value" : "..."
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

PUT /datasource/{id}/entries

Update the entries in the given order

Request Parameters
name type description
id path datasource id
Request Body
media type data type description
application/json array of DatasourceEntryModel (JSON) list of entries
Response Codes
code condition
200 Entry {entryId} was updated.
400 No request body was sent.
404 Datasource {id} does not exist or entry {entryId} does not exist.
409 Some entry data violate the uniqueness constraint.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json DatasourceEntryListResponse (JSON) response containing the list of updated entries

Example

Request
PUT /datasource/{id}/entries
Content-Type: application/json
Accept: application/json

                
[ {
  "id" : 12345,
  "globalId" : "...",
  "dsId" : 12345,
  "key" : "...",
  "value" : "..."
} ]
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "items" : [ { }, { } ],
  "hasMoreItems" : true,
  "numItems" : 12345,
  "perms" : {
    "property1" : [ "linkoverview", "deleteitems" ],
    "property2" : [ "inheritance", "updatefolder" ]
  },
  "stagingStatus" : {
    "property1" : {
      "packageName" : "...",
      "included" : true
    },
    "property2" : {
      "packageName" : "...",
      "included" : true
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /datasource/{id}/hash

Get the implementation hash for a datasource

Request Parameters
name type description
id path datasource ID
Response Codes
code condition
200 Datasource {id} exists.
404 Datasource {id} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json ImplementationHashResponse (JSON) response with implementation hash

Example

Request
GET /datasource/{id}/hash
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "hash" : "...",
  "base" : "...",
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

DELETE /datasource/{id}/entries/{entryId}

Delete a datasource entry

Request Parameters
name type description
entryId path datasource entry id
id path datasource id
Response Codes
code condition
204 Entry {entryId} was deleted.
404 Datasource {id} does not exist or entry {entryId} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json object (JSON) empty response

Example

Request
DELETE /datasource/{id}/entries/{entryId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
...
                
              

GET /datasource/{id}/entries/{entryId}

Get existing datasource entry

Request Parameters
name type description
entryId path datasource entry id
id path datasource id
Response Codes
code condition
200 Entry {entryId} is returned.
404 Datasource {id} does not exist or entry {entryId} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json DatasourceEntryResponse (JSON) response containing the entry

Example

Request
GET /datasource/{id}/entries/{entryId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "entry" : {
    "id" : 12345,
    "globalId" : "...",
    "dsId" : 12345,
    "key" : "...",
    "value" : "..."
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

PUT /datasource/{id}/entries/{entryId}

Update a datasource entry

Request Parameters
name type description
entryId path datasource entry id
id path datasource id
Request Body
media type data type description
application/json DatasourceEntryModel (JSON) updated entry
Response Codes
code condition
200 Entry {entryId} was updated.
400 No request body was sent.
404 Datasource {id} does not exist or entry {entryId} does not exist.
409 One of the given values is already used by another entry.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json DatasourceEntryResponse (JSON) response containing the updated entry

Example

Request
PUT /datasource/{id}/entries/{entryId}
Content-Type: application/json
Accept: application/json

                
{
  "id" : 12345,
  "globalId" : "...",
  "dsId" : 12345,
  "key" : "...",
  "value" : "..."
}
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "entry" : {
    "id" : 12345,
    "globalId" : "...",
    "dsId" : 12345,
    "key" : "...",
    "value" : "..."
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}