Skip to content
This repository has been archived by the owner on Jul 2, 2018. It is now read-only.

Profiles: Get single profile

Natasa Bulatovic edited this page Jul 9, 2015 · 4 revisions

##GET /profiles/:id *Retrieves a profile with this id

##GET /profiles/default *Retrieves default metadata profile for the imeji instance. The Id of this profile can be used when creating a collection.

####Response status codes #####200 OK Successful retrieval of the profilewith provided :id

#####404 Not found The profile with provided :id is not found (does not exist)

#####401 Unauthorized Authentication is necessary to retrieve this profile

#####403 Forbidden Wrong credentials provided to retrieve this profile(e.g. pending profile, but a user who is not creator of this profile tries to retrieve it)

####Example request curl http://<base-url>/profiles/FKMxUpYdV9N2J4XG

####Example request for default profile curl http://<base-url>/profiles/default

#####Example response body

{  
"id":"0SDt44zcRBL5mtz",
"createdBy":{  
    "fullname":"",
    "userId":"8LSCGfg0MonqbYg_"
},
"modifiedBy":{  
    "fullname":"",
    "userId":"8LSCGfg0MonqbYg_"
},
"createdDate":"2015-02-12T13:08:58 +0100",
"modifiedDate":"2015-02-12T13:08:58 +0100",
"versionDate":"2015-02-12T13:08:58 +0100",
"status":"RELEASED",
"version":0,
"discardComment":"",
"title":"Default metadata profile",
"description":"Default metadata profile description",
"statements":[  
    {  
        "id":"pX1ay_9g2pFEO_zU",
        "pos":0,
        "type":"http://imeji.org/terms/metadata#license",
        "labels":[  
            {  
                "value":"License",
                "lang":"en"
            }
        ],
        "vocabulary":null,
        "literalConstraints":[  

        ],
        "minOccurs":"0",
        "maxOccurs":"1",
        "parentStatementId":null,
        "useInPreview":true
    }
],
"default":true
}
Clone this wiki locally