Uma das seguintes permissões é obrigatória para chamar esta API. Para saber mais, incluindo como escolher permissões, confira Permissões.
Tipo de permissão
Permissões (da com menos para a com mais privilégios)
Delegado (conta corporativa ou de estudante)
User.ReadWrite, User.ReadWrite.All
Delegado (conta pessoal da Microsoft)
User.ReadWrite, User.ReadWrite.All
Aplicativo
User.ReadWrite.All
Solicitação HTTP
POST /me/profile/patents
POST /users/{id | userPrincipalName}/profile/patents
Cabeçalhos de solicitação
Nome
Descrição
Autorização
{token} de portador. Obrigatório.
Content-Type
application/json. Obrigatório.
Corpo da solicitação
No corpo da solicitação, fornece uma representação JSON do objeto itemPatent.
A tabela a seguir mostra as propriedades que são possíveis de definir ao criar um novo objeto itemPatent no perfil de um usuário.
Propriedade
Tipo
Descrição
allowedAudiences
Cadeia de caracteres
As audiências que são capazes de ver os valores contidos na entidade. Herdado do itemFacet. Os valores possíveis são: me, family, contacts, groupMembers, organization, federatedOrganizations, everyone, unknownFutureValue.
POST https://graph.microsoft.com/beta/me/profile/patents
Content-Type: application/json
{
"description": "Calculating the intent of a user to purchase an item based on the amount of time they hover their mouse over a given pixel.",
"displayName": "Inferring User Intent through browsing behaviors",
"isPending": true,
"number": "USPTO-3954432633",
"webUrl": "https://patents.gov/3954432633"
}
GraphServiceClient graphClient = new GraphServiceClient( authProvider );
var itemPatent = new ItemPatent
{
Description = "Calculating the intent of a user to purchase an item based on the amount of time they hover their mouse over a given pixel.",
DisplayName = "Inferring User Intent through browsing behaviors",
IsPending = true,
Number = "USPTO-3954432633",
WebUrl = "https://patents.gov/3954432633"
};
await graphClient.Me.Profile.Patents
.Request()
.AddAsync(itemPatent);
Importante
Os SDKs do Microsoft Graph usam a versão v1.0 da API por padrão e não dão suporte a todos os tipos, propriedades e APIs disponíveis na versão beta. Para obter detalhes sobre como acessar a API beta com o SDK, consulte Usar os SDKs do Microsoft Graph com a API beta.
const options = {
authProvider,
};
const client = Client.init(options);
const itemPatent = {
description: 'Calculating the intent of a user to purchase an item based on the amount of time they hover their mouse over a given pixel.',
displayName: 'Inferring User Intent through browsing behaviors',
isPending: true,
number: 'USPTO-3954432633',
webUrl: 'https://patents.gov/3954432633'
};
await client.api('/me/profile/patents')
.version('beta')
.post(itemPatent);
Importante
Os SDKs do Microsoft Graph usam a versão v1.0 da API por padrão e não dão suporte a todos os tipos, propriedades e APIs disponíveis na versão beta. Para obter detalhes sobre como acessar a API beta com o SDK, consulte Usar os SDKs do Microsoft Graph com a API beta.
MSHTTPClient *httpClient = [MSClientFactory createHTTPClientWithAuthenticationProvider:authenticationProvider];
NSString *MSGraphBaseURL = @"https://graph.microsoft.com/beta/";
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:[MSGraphBaseURL stringByAppendingString:@"/me/profile/patents"]]];
[urlRequest setHTTPMethod:@"POST"];
[urlRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
MSGraphItemPatent *itemPatent = [[MSGraphItemPatent alloc] init];
[itemPatent setDescription:@"Calculating the intent of a user to purchase an item based on the amount of time they hover their mouse over a given pixel."];
[itemPatent setDisplayName:@"Inferring User Intent through browsing behaviors"];
[itemPatent setIsPending: true];
[itemPatent setNumber:@"USPTO-3954432633"];
[itemPatent setWebUrl:@"https://patents.gov/3954432633"];
NSError *error;
NSData *itemPatentData = [itemPatent getSerializedDataWithError:&error];
[urlRequest setHTTPBody:itemPatentData];
MSURLSessionDataTask *meDataTask = [httpClient dataTaskWithRequest:urlRequest
completionHandler: ^(NSData *data, NSURLResponse *response, NSError *nserror) {
//Request Completed
}];
[meDataTask execute];
Importante
Os SDKs do Microsoft Graph usam a versão v1.0 da API por padrão e não dão suporte a todos os tipos, propriedades e APIs disponíveis na versão beta. Para obter detalhes sobre como acessar a API beta com o SDK, consulte Usar os SDKs do Microsoft Graph com a API beta.
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
ItemPatent itemPatent = new ItemPatent();
itemPatent.description = "Calculating the intent of a user to purchase an item based on the amount of time they hover their mouse over a given pixel.";
itemPatent.displayName = "Inferring User Intent through browsing behaviors";
itemPatent.isPending = true;
itemPatent.number = "USPTO-3954432633";
itemPatent.webUrl = "https://patents.gov/3954432633";
graphClient.me().profile().patents()
.buildRequest()
.post(itemPatent);
Importante
Os SDKs do Microsoft Graph usam a versão v1.0 da API por padrão e não dão suporte a todos os tipos, propriedades e APIs disponíveis na versão beta. Para obter detalhes sobre como acessar a API beta com o SDK, consulte Usar os SDKs do Microsoft Graph com a API beta.
//THE GO SDK IS IN PREVIEW. NON-PRODUCTION USE ONLY
graphClient := msgraphsdk.NewGraphServiceClient(requestAdapter)
requestBody := msgraphsdk.NewItemPatent()
description := "Calculating the intent of a user to purchase an item based on the amount of time they hover their mouse over a given pixel."
requestBody.SetDescription(&description)
displayName := "Inferring User Intent through browsing behaviors"
requestBody.SetDisplayName(&displayName)
isPending := true
requestBody.SetIsPending(&isPending)
number := "USPTO-3954432633"
requestBody.SetNumber(&number)
webUrl := "https://patents.gov/3954432633"
requestBody.SetWebUrl(&webUrl)
result, err := graphClient.Me().Profile().Patents().Post(requestBody)
Importante
Os SDKs do Microsoft Graph usam a versão v1.0 da API por padrão e não dão suporte a todos os tipos, propriedades e APIs disponíveis na versão beta. Para obter detalhes sobre como acessar a API beta com o SDK, consulte Usar os SDKs do Microsoft Graph com a API beta.
Import-Module Microsoft.Graph.People
$params = @{
Description = "Calculating the intent of a user to purchase an item based on the amount of time they hover their mouse over a given pixel."
DisplayName = "Inferring User Intent through browsing behaviors"
IsPending = $true
Number = "USPTO-3954432633"
WebUrl = "https://patents.gov/3954432633"
}
# A UPN can also be used as -UserId.
New-MgUserProfilePatent -UserId $userId -BodyParameter $params
Importante
Os SDKs do Microsoft Graph usam a versão v1.0 da API por padrão e não dão suporte a todos os tipos, propriedades e APIs disponíveis na versão beta. Para obter detalhes sobre como acessar a API beta com o SDK, consulte Usar os SDKs do Microsoft Graph com a API beta.
Observação: o objeto de resposta mostrado aqui pode ser encurtado para legibilidade.
HTTP/1.1 201 Created
Content-Type: application/json
{
"id": "0fb4c1e3-c1e3-0fb4-e3c1-b40fe3c1b40f",
"allowedAudiences": "me",
"inference": null,
"createdDateTime": "2020-07-06T06:34:12.2294868Z",
"createdBy": {
"application": null,
"device": null,
"user": {
"displayName": "Innocenty Popov",
"id": "db789417-4ccb-41d1-a0a9-47b01a09ea49"
}
},
"lastModifiedDateTime": "2020-07-06T06:34:12.2294868Z",
"lastModifiedBy": {
"application": null,
"device": null,
"user": {
"displayName": "Innocenty Popov",
"id": "db789417-4ccb-41d1-a0a9-47b01a09ea49"
}
},
"source": null,
"description": "Calculating the intent of a user to purchase an item based on the amount of time they hover their mouse over a given pixel.",
"displayName": "Inferring User Intent through browsing behaviors",
"isPending": true,
"issuedDate": "Date",
"issuingAuthority": null,
"number": "USPTO-3954432633",
"webUrl": "https://patents.gov/3954432633"
}