Skeddly API
Search
K

CopyCredential Method

Description

Copies a cloud-provider credential, within a project, or from one project to another.

HTTP Request

POST https://api.skeddly.com/api/Credentials/Copy

Body

The body is a JSON structure with the following properties.

credentialId

Credential ID of the source credential to be copied. This credential can be in the same project or different project from projectid.
Type: string
Required: Yes

nameOverride

Name of the new credential. The name of the source credential will be used if omitted.
Type: string
Required: No

projectId

Project ID of the project into which the new copy will be contained.
Type: string
Required: Yes

Returns

A Credential object.

Sample Request

HTTP
Bash
POST /api/Credentials/Copy HTTP/1.1
Host: api.skeddly.com
Authorization: AccessKey <api key>
Content-Type: application/json
{
"projectId": "proj-12345678",
"credentialId": "cred-12345678",
"nameOverride": "Copy of My Credential"
}
curl -X POST "https://api.skeddly.com/api/Credentials/Copy" \
-H "Authorization: AccessKey <api key>" \
89012:role/Skeddly" \
-d projectId=proj-12345678 \
-d credentialId=cred-12345678 \
-d name="Copy of My Credential"

Sample Response

{
"amazonIamRole": {
"roleArn": "arn:aws:iam::123456789012:role/Skeddly",
"externalId": "skeddly-12345678"
},
"cloudProviderSubTypeId": "amazon-standard",
"createdDate": "2016-06-08T14:42:00Z",
"credentialId": "cred-00000001",
"credentialType": "amazon-iam-role",
"isUsedForSnsNotifications": false,
"lastModifiedDate": "2016-06-08T14:42:00Z",
"lastModifiedBy": "u-00000001",
"name": "Copy of My Credential",
"projectId": "proj-12345678",
"status": "active"
}