A profile defines a type and the schema any item of such a type must comply with.
Returns the list of profiles name available for the context of the request (i.e. the context where the token has been generated).
name | type | description | default | constraints |
---|---|---|---|---|
Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources | ||
count | query | (Default:false) If count=true the API returns total number of profile instead of the list. |
false | boolean |
media type | data type | description |
---|---|---|
application/json | string | a JSON Array. |
GET /profiles
Content-Type: */*
Accept: application/json
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json
["EmptyProfile","TestProfile","ComplexProfile"]
name | type | description |
---|---|---|
Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
PROFILE_NAME | path |
media type | data type | description |
---|---|---|
*/* | object |
DELETE /profiles/{PROFILE_NAME}
Content-Type: */*
Accept: */*
Authorization: ...
...
HTTP/1.1 204 No Content
Content-Type: */*
...
This API allow to read a profile definition.
This API return by default the content in XML.
It is possible reading a profile in JSON by specifing the HTTP Header:
Accept: application/json
name | type | description |
---|---|---|
Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
PROFILE_NAME | path | the name of the profile |
code | condition |
---|---|
200 | The profile exists. |
media type | data type | description |
---|---|---|
application/json | string | the profile definition |
application/xml | string |
GET /profiles/EmptyProfile
Content-Type: */*
Accept: application/json
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"metadataformat": {
"metadatafield": {
"note": "Test field",
"fieldName": "test",
"dataType": "String",
"mandatory": false
},
"type": "EmptyProfile"
}
}
A profile must comply with the defined XSD schema . Please find the documentation of profile schema at: at Metadata Profile>
name | type | description |
---|---|---|
Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
PROFILE_NAME | path |
media type | data type |
---|---|
application/xml | string |
media type | data type | description |
---|---|---|
application/xml | object |
PUT /profiles/{PROFILE_NAME}
Content-Type: application/xml
Accept: application/xml
Authorization: ...
...
HTTP/1.1 204 No Content
Content-Type: application/xml
...